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:55] – 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 | + | {{: |
- | 8dd99b80-ubuntu-logo14.png | + | |
===== 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 ==== | ||
There are a few things that can be removed at this point to clean up your install to reduce resource use and protect your privacy. | There are a few things that can be removed at this point to clean up your install to reduce resource use and protect your privacy. | ||
- | When you type a command that's not found on your $PATH, Ubuntu will try to look it up and recommend packages to install that may be what you're looking for. This often means that instead of a quick error message, there is a delay before returning to a prompt. You can stop this behavior by removing the command-not-found package. | + | When you type a command that's not found on your $PATH, Ubuntu will try to look it up and recommend packages to install that may be what you're looking for. This often means that instead of a quick error message, there is a delay before returning to a prompt. You can stop this behavior by removing the '' |
sudo apt-get purge command-not-found | sudo apt-get purge command-not-found | ||
Line 121: | Line 115: | ||
sudo apt autoremove | sudo apt autoremove | ||
- | 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.1615863327.txt.gz · Last modified: 2021/03/16 02:55 by hc9