User Tools

Site Tools


servers:secure_shell

This is an old revision of the document!


Information

  • OpenSSH server notes
  • See SSH Client notes for clients

Force Public Key Authentication

  • :!: Be sure to generate/restore keys and to copy to server before disabling passwords
  • :!: See SSH Client notes
  • :!: Check /etc/ssh/sshd_config to see what directory is used for .conf files if this doesn't work
  • Tested on 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

chmod '400' ~/'.ssh/authorized_keys'
/var/www/wiki/data/attic/servers/secure_shell.1591945192.txt.gz · Last modified: 2020/06/12 02:59 by Sean Rhone