Ssh configuration: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Jawadmin
(Created page with "enable encrypted ssh authentication $ mkdir ~/.ssh $ chmod 700 ~/.ssh copy public keys from another host $ vim ~/.ssh/authorized_keys Force key authentication only $ sudo...")
 
imported>Jawadmin
No edit summary
Line 1: Line 1:
enable encrypted ssh authentication
Enable encrypted ssh authentication
  $ mkdir ~/.ssh
  $ mkdir ~/.ssh
  $ chmod 700 ~/.ssh
  $ chmod 700 ~/.ssh
copy public keys from another host
Copy public keys from another host
  $ vim ~/.ssh/authorized_keys
  $ vim ~/.ssh/authorized_keys
Force key authentication only
Force key authentication only

Revision as of 09:38, 23 December 2018

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