linux系统用户自动登陆不需要输入密码设置

####使用于ubuntu,linux,unix#######

一 删除密码

 root@ubuntu # passwd -d root     或者    passwd root -d


二 修改sshd_config文件

 root@ubuntu #cd /etc/ssh/

root@ubuntu #vim sshd_config   ##如果没有,使用touch创建一个

在 sshd_config末尾添加:

        PermitEmptyPasswords yes

        PermitRootLogin yes

或者使用echo命令:

root@ubuntu #echo "PermitEmptyPasswords yes" >>/etc/ssh/sshd_config

root@ubuntu #echo "PermitRootLogin yes" >>/etc/ssh/sshd_config



root@ubuntu #chown root /var/empty




三  重启

root@ubuntu # reboot





猜你喜欢

转载自blog.csdn.net/frank_ldw/article/details/80611596