[Ggp @ test182 ~] $ Ll. sshtotal 8-rw-r -- r -- 1 ggp 588 Sep 25 authorized_keys [ggp @ test182 ~] $ Ll. ssh/authorized_keys-rw-r -- r -- 1 ggp 588 Sep 25. ssh/authorized_keys [ggp @ test182 ~] $
Remember to change the. ssh permission to 700, and change the authorized_keys permission to 644. The above two permissions seem to be appropriate.
The user and group of. ssh and authorized_keys are ggp. ggp instead of root. root.
Otherwise, you may not be able to log on normally.
Server/etc/ssh/sshd_config Configuration
OpenSSH configuration is usually stored in:/etc/ssh/sshd_config
PermitRootLogin no # prohibit root User Login
StrictModes yes # Check whether the key user and permissions are correct.
RSAAuthentication yes # enable RSA Authentication
AuthorizedKeysFile. ssh/authorized_keys # verify the storage path of the Public Key
PubkeyAuthentication yes # enable Public Key Authentication
PasswordAuthentication no # password authentication is disabled. It is enabled by default.