User Tools

Site Tools


servers:secure_shell

Differences

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

Link to this comparison view

Next revision
Previous revision
servers:secure_shell [2020/06/12 02:59] – created Sean Rhoneservers:secure_shell [2024/08/13 16:29] (current) – removed Sean Rhone
Line 1: Line 1:
-====== Information ====== 
- 
-  * Various commands for an OpenSSH server 
-  * See [[clients:secure_shell|SSH Client]] notes for clients 
- 
-====== Force Public Key Authentication ====== 
- 
-  * :!: Be sure to generate/restore keys and to copy to server before disabling passwords 
-  * :!: See [[clients:secure_shell|SSH Client]] notes 
-  * :!: Check ''/etc/ssh/sshd_config'' to see what directory is used for ''.conf'' files if this doesn't work 
-  * 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' 
  
/usr/local/www/wiki/data/attic/servers/secure_shell.1591945179.txt.gz · Last modified: (external edit)