sudo apt-get install openssh-server
ssh出现permission denied (publickey)问题:
修改/etc/ssh/sshd-config文件.
将其中的PermitRootLogin no修改为yes
PubkeyAuthentication yes修改为no
AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉,
PasswordAuthentication no修改为yes就可以了。
重启sshd即可:service sshd restart
/etc/init.d/ssh restart
ssh出现permission denied (publickey)问题:
修改/etc/ssh/sshd-config文件.
将其中的PermitRootLogin no修改为yes
PubkeyAuthentication yes修改为no
AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉,
PasswordAuthentication no修改为yes就可以了。
重启sshd即可:service sshd restart
/etc/init.d/ssh restart

本文详细介绍了如何通过修改/etc/ssh/sshd-config文件,解决使用sudo apt-get install openssh-server安装openssh-server时遇到的permission denied(publickey)问题。包括修改配置项PermitRootLogin、PubkeyAuthentication、AuthorizedKeysFile和PasswordAuthentication,并最终通过重启sshd服务完成问题解决。
6630

被折叠的 条评论
为什么被折叠?



