linux服务器root默认密码是随机的,所以我们并不知道
当su时,会出su:Authentication failure
针对此问题,我们需要修改root的密码
用sudo passwd root 设置密码
然后修改/etc/ssh/sshd_config
将PubkeyAuthentication without-password
改成
PubkeyAuthentication yes
重新启动系统,再次登陆ssh客户端,直接用root登陆,输入新密码即可
linux服务器root默认密码是随机的,所以我们并不知道
当su时,会出su:Authentication failure
针对此问题,我们需要修改root的密码
用sudo passwd root 设置密码
然后修改/etc/ssh/sshd_config
将PubkeyAuthentication without-password
改成
PubkeyAuthentication yes
重新启动系统,再次登陆ssh客户端,直接用root登陆,输入新密码即可
转载于:https://www.cnblogs.com/l-xxx-10000/p/5417937.html