User Tools

Site Tools


distros:ubuntu_server

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
Next revisionBoth sides next revision
distros:ubuntu_server [2020/06/12 02:35] Sean Rhonedistros:ubuntu_server [2020/06/12 02:50] Sean Rhone
Line 67: Line 67:
   * See [[Clients:Secure Shell]]   * See [[Clients:Secure Shell]]
  
-===== Force Public Key Authentication =====+==== Force Public Key Authentication ====
  
   * :!: Be sure to generate/restore keys and to copy to server before disabling passwords   * :!: Be sure to generate/restore keys and to copy to server before disabling passwords
   * :!: See [[clients:secure_shell|Secure Shell]] notes   * :!: See [[clients:secure_shell|Secure Shell]] notes
 +  * :!: Check ''/etc/ssh/sshd_config'' to see what directory is used for ''.conf'' files if this doesn't work
  
-  echo 'PasswordAuthentication no' | sudo tee '/etc/ssh/ssh_config.d/custom-pubkey-only.conf' > '/dev/null' && cat '/etc/ssh/ssh_config.d/custom-pubkey-only.conf'+  echo 'PasswordAuthentication no' | sudo tee '/etc/ssh/sshd_config.d/custom-pubkey-only.conf' > '/dev/null' && cat '/etc/ssh/sshd_config.d/custom-pubkey-only.conf'
  
-  sudo -e '/etc/ssh/ssh_config.d/custom-pubkey-only.conf'+  sudo -e '/etc/ssh/sshd_config.d/custom-pubkey-only.conf'
  
 ===== Sensors ===== ===== Sensors =====
Line 93: Line 94:
  
   * Allows SSH   * Allows SSH
-  * Limits SSH connections+  * :!: Does not limit SSH ((this caused issues; better to just secure SSH))
   * See [[notes:ufw|ufw]] for more notes   * See [[notes:ufw|ufw]] for more notes
  
-  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow 'ssh' && sudo ufw limit 'ssh' && sudo ufw enable && sudo systemctl enable 'ufw'+  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow 'ssh' && sudo ufw enable && sudo systemctl enable 'ufw'
  
 ====== Automatic Updates ====== ====== Automatic Updates ======
/var/www/wiki/data/pages/distros/ubuntu_server.txt · Last modified: 2024/02/07 09:22 by Sean Rhone