Ssh configuration

From wiki
Revision as of 15:30, 23 December 2018 by imported>Jawadmin
Jump to navigation Jump to search

Return Main Page Next ssh configuration


Enable encrypted ssh authentication

$ mkdir ~/.ssh
$ chmod 700 ~/.ssh

Copy public keys from another host

$ vim ~/.ssh/authorized_keys

Force key authentication only

$ sudo vim /etc/ssh/sshd_config
 PermitRootLogin no              # << Changed to prohibit root login over ssh
 PasswordAuthentication no       # << This toggles the ssh key only authorization
 ChallengeResponseAuthentication no      # changed to force key auth. only
 UsePAM no                       # << Changed to set ssh key authorization only