vps_-_ubuntu
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vps_-_ubuntu [2021/03/16 02:59] – [Ubuntu on SDF VPS] hc9 | vps_-_ubuntu [2021/04/02 19:05] (current) – [Cleanup] hc9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu on SDF VPS ====== | ====== Ubuntu on SDF VPS ====== | ||
- | IMAGE_HERE | + | {{:vps_-_ubuntu: |
- | vps_-_ubuntu: | + | |
===== Basics ===== | ===== Basics ===== | ||
Line 34: | Line 33: | ||
Delete the file ''/ | Delete the file ''/ | ||
- | <code> | + | <file config |
network: | network: | ||
version: 2 | version: 2 | ||
Line 46: | Line 45: | ||
nameservers: | nameservers: | ||
addresses: [205.166.94.20] | addresses: [205.166.94.20] | ||
- | </code> | + | </file> |
Save the file, then apply the config by running: | Save the file, then apply the config by running: | ||
Line 62: | Line 61: | ||
Add this to /etc/hosts: | Add this to /etc/hosts: | ||
- | | + | <file config / |
- | + | YOUR_IP | |
+ | </ | ||
Change / | Change / | ||
- | | + | <file config / |
+ | YOUR_HOSTNAME | ||
+ | </ | ||
===== Updates ===== | ===== Updates ===== | ||
Line 85: | Line 87: | ||
===== SSH ===== | ===== SSH ===== | ||
- | Install SSH. | + | * Install SSH. < |
- | + | </ | |
- | | + | |
- | + | PermitRootLogin no | |
- | Edit ''/ | + | </ |
- | + | | |
- | | + | </ |
- | + | | |
- | Restart sshd. | + | * If you'll always be connecting from the same ip (eg. your home computer) you can create explicit rules to only allow that ip to connect. However, note that most ISPs do not assign static IPs, so if yours changes you'll need to log into the console and update your firewall. |
- | + | </ | |
- | | + | |
- | + | </ | |
- | Create a firewall rule to allow ssh connections. If you'll always be connecting from the same ip (eg. your home computer) you can create explicit rules to only allow that ip to connect. However, note that most ISPs do not assign static IPs, so if yours changes you'll need to log into the console and update your firewall. | + | |
- | + | ||
- | | + | |
- | + | ||
- | If you need to be able to connect from anywhere, allow 22 from anywhere. | + | |
- | + | ||
- | | + | |
==== Cleanup ==== | ==== Cleanup ==== | ||
Line 123: | Line 117: | ||
You may have noticed that on login, your MOTD contains a lot of information, | You may have noticed that on login, your MOTD contains a lot of information, | ||
- | | + | <file config / |
+ | ENABLED=0 | ||
+ | </ | ||
You can take this further and move or delete the files found in ''/ | You can take this further and move or delete the files found in ''/ | ||
---- | ---- | ||
- | $Id: VPS_Ubuntu.html, | + | $Id: VPS_Ubuntu.html, |
vps_-_ubuntu.1615863583.txt.gz · Last modified: 2021/03/16 02:59 by hc9