vps_-_ubuntu
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
vps_-_ubuntu [2021/03/16 03:03] – [Ubuntu on SDF VPS] hc9 | vps_-_ubuntu [2021/04/02 19:04] – [SSH] hc9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu on SDF VPS ====== | ====== Ubuntu on SDF VPS ====== | ||
- | {{: | + | {{: |
===== Basics ===== | ===== Basics ===== | ||
Line 33: | Line 33: | ||
Delete the file ''/ | Delete the file ''/ | ||
- | <code> | + | <file config |
network: | network: | ||
version: 2 | version: 2 | ||
Line 45: | 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 61: | 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 84: | 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 127: | Line 122: | ||
---- | ---- | ||
- | $Id: VPS_Ubuntu.html, | + | $Id: VPS_Ubuntu.html, |
vps_-_ubuntu.txt · Last modified: 2021/04/02 19:05 by hc9