ssh permission denied (publickey)

engineer0 2014-12-16

sudoapt-getinstallopenssh-server

ssh出现permissiondenied(publickey)问题:

修改/etc/ssh/sshd-config文件.

将其中的PermitRootLoginno修改为yes

PubkeyAuthenticationyes修改为no

AuthorizedKeysFile.ssh/authorized_keys前面加上#屏蔽掉,

PasswordAuthenticationno修改为yes就可以了。

重启sshd即可:servicesshdrestart

/etc/init.d/sshrestart

相关推荐