User Tools

Site Tools


vps_-_ubuntu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vps_-_ubuntu [2021/04/02 19:02] – [SSH] hc9vps_-_ubuntu [2021/04/02 19:05] (current) – [Cleanup] hc9
Line 92: Line 92:
 PermitRootLogin no PermitRootLogin no
 </file> </file>
-  * Restart sshd. <CODE> sudo systemctl restart sshd+  * Restart sshd. <code> sudo systemctl restart sshd
 </code> </code>
   * Create a firewall rule to allow ssh connections.   * 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. <code> sudo ufw allow from YOUR_HOME_IP/32 to any port 22     * 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. <code> sudo ufw allow from YOUR_HOME_IP/32 to any port 22
 </code> </code>
-  * If you need to be able to connect from anywhere, allow 22 from anywhere. <code> sudo ufw allow 22+    * If you need to be able to connect from anywhere, allow 22 from anywhere. <code> sudo ufw allow 22
 </code> </code>
 ==== Cleanup ==== ==== Cleanup ====
Line 117: Line 117:
 You may have noticed that on login, your MOTD contains a lot of information, some of which is dynamically generated from sources on the internet. One of these steps sends information about the machine to Ubuntu as part of the request for latest news. We can disable this in ''/etc/default/motd-news''. You may have noticed that on login, your MOTD contains a lot of information, some of which is dynamically generated from sources on the internet. One of these steps sends information about the machine to Ubuntu as part of the request for latest news. We can disable this in ''/etc/default/motd-news''.
  
-  ENABLED=0+<file config /etc/default/motd-news> 
 +ENABLED=0 
 +</file>
  
 You can take this further and move or delete the files found in ''/etc/update-motd.d/'' and optionally replace them with your own script. On login, Ubuntu will execute the scripts in this folder and display anything they send to stdout. You can also create ''/etc/motd'' and any text in that file will be displayed after any output from your motd scripts. You can take this further and move or delete the files found in ''/etc/update-motd.d/'' and optionally replace them with your own script. On login, Ubuntu will execute the scripts in this folder and display anything they send to stdout. You can also create ''/etc/motd'' and any text in that file will be displayed after any output from your motd scripts.
vps_-_ubuntu.1617390163.txt.gz · Last modified: 2021/04/02 19:02 by hc9