【发布时间】:2017-11-08 00:35:12
【问题描述】:
在 ~/.ssh/authorized_keys 我添加了一个想要连接到服务器的用户的公钥。
当该用户尝试连接时,他会收到 Permission denied (publickey) 错误。错误日志:
input_userauth_request: invalid user USERNAME [preauth]
在我的配置 (/etc/ssh/sshd_config) 文件中,我有:
AllowUsers USERNAME
在我的配置(/~.ssh/config)中,我有:
Host hostname
User root
User USERNAME
HostName IP address
IdentityFile ~/.ssh/id_rsa
PubKeyAuthentication yes
为什么他不能登录服务器?
【问题讨论】: