User Tools

Site Tools


servers:secure_shell

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
servers:secure_shell [2020/06/12 03:12] – external edit 127.0.0.1servers:secure_shell [2024/08/13 16:29] (current) – removed Sean Rhone
Line 1: Line 1:
-====== Information ====== 
- 
-  * OpenSSH server notes 
-  * See [[clients:secure_shell|OpenSSH Client]] notes for clients 
- 
-====== Config Files ====== 
- 
-===== Main ===== 
- 
-**** 
- 
-  sudo -e '/etc/ssh/sshd_config' 
- 
-===== Custom ===== 
- 
-  * Check ''sshd_config'' to make sure ''sshd_config.d'' is included 
-  
-<code>/etc/ssh/sshd_config.d</code> 
- 
-====== Force Public Key Authentication ====== 
- 
-  * [[https://wiki.archlinux.org/index.php/OpenSSH#Force_public_key_authentication|ArchWiki]] 
-  * :!: Be sure to generate/restore keys and to copy to server before disabling passwords 
-  * :!: See [[clients:secure_shell|SSH Client]] notes 
-  * Tested on [[distros:ubuntu_server|Ubuntu 20.04]] 
- 
-  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/sshd_config.d/custom-pubkey-only.conf' 
- 
-===== Secure Authorized Keys ===== 
- 
-  * [[https://wiki.archlinux.org/index.php/OpenSSH#Securing_the_authorized_keys_file|ArchWiki]] 
- 
-  chmod '400' ~/'.ssh/authorized_keys' 
- 
-====== Disable Root Login ====== 
- 
-  * [[https://wiki.archlinux.org/index.php/OpenSSH#Deny|ArchWiki]] 
- 
-  echo 'PermitRootLogin no' | sudo tee '/etc/ssh/sshd_config.d/custom-root-login-disable.conf' > '/dev/null' && cat '/etc/ssh/sshd_config.d/custom-root-login-disable.conf' 
- 
-  sudo -e '/etc/ssh/sshd_config.d/custom-root-login-disable.conf' 
  
/usr/local/www/wiki/data/attic/servers/secure_shell.1591945922.txt.gz · Last modified: by 127.0.0.1