After still ssh successfully copy the public key to enter a password

1, the Internet, said rights issue

Login process:

被登录机器的文件权限:
//用户权限

chmod 700 /home/username

//.ssh文件夹权限

chmod 700 ~/.ssh/

// ~/.ssh/authorized_keys 文件权限

chmod 600 ~/.ssh/authorized_keys

2, modify the configuration file restart service, the login server operation

#禁用root账户登录,如果是用root用户登录请开启
PermitRootLogin yes

# 是否让 sshd 去检查用户家目录或相关档案的权限数据,
# 这是为了担心使用者将某些重要档案的权限设错,可能会导致一些问题所致。
# 例如使用者的 ~.ssh/ 权限设错时,某些特殊情况下会不许用户登入
StrictModes no

# 是否允许用户自行使用成对的密钥系统进行登入行为,仅针对 version 2。
# 至于自制的公钥数据就放置于用户家目录下的 .ssh/authorized_keys 内
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys

# 有了证书登录了,就禁用密码登录。
PasswordAuthentication no

The above configuration problem

If the "Agent admitted failure to sign using the key" in the process of copying the public key exception, run the following command:
SSH-the Add ~ / .ssh / id_rsa

Guess you like

Origin www.cnblogs.com/g2thend/p/11712948.html