SSH登录Linux不用密码
SSH登录Linux不用密码
我想很多人学习Linux都是装的虚拟机,然后在windows下ssh登录虚拟机的Linux,是不是嫌每次都要输入密码很烦呢,下面教大家一招,这样登录Linux就不用密码了。首先,先把你的密码清空啊。
然后修改/etc/ssh/sshd_config文件:
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication no
PermitEmptyPasswords yes
PasswordAuthentication yes
最后重启一下服务:service sshd restart就可以了。
或者你用putty工具的话,不用清除密码也可以,写一个批处理如下:
start putty -pw 密码 用户名@IP地址
运行就可以了。
评论暂时关闭