不能ssh,权限被拒绝

我已经使用useradd USER创build了新用户,但我无法SSH连接到服务器并使用它login。 我已经拥有了另一个可以轻松进行SSH连接的帐户。

运行ssh -v [email protected]在input密码后返回这个消息:

 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password 

当尝试acocunt,我得到的作品

 debug1: Authentication succeeded (password). 

我知道密码是正确的,因为一旦我使用工作帐户的SSH我可以改变用户成功。

我有一个类似的问题。 原来,/ /etc/ssh/sshd.conf AllowUsers /etc/ssh/sshd.confAllowUsers行。 通过向该行添加新用户并重新启动SSH来解决此问题。

我遇到了.ssh和authorized_keys权限不正确的问题。 设置700到.ssh和600到authorized_keys解决了这个问题。