kali使用ssh进行登录

1.首先是使用命令切换  : ~#  cd /etc/ssh 查看配置文件

2.使用vim进行编辑文件 vim ssh_config

找到其中的两项 1. 将其修改 # PasswordAuthentication no 去掉其注释,并且将no改为yes

                 2.PasswordAuthentication no 改为yes 

3.然后:wq

退出之后可能存在登录之后密码不正确的情况,此时需要修改配置文件 sshd_config

将 # Authentication:

 LoginGraceTime 2m

PermitRootLogin prohibit-password

StrictModes yes

修改为 # Authentication:

LoginGraceTime 2m

PermitRootLogin yes

StrictModes yes

然后:wq保存文件




4.此时需要进行重启ssh服务 

service ssh strat

或者是

service ssh restart(如果在没有修改第二个配置文件sshd_config的情况下,可以进行登录的话,此时这条指令就不再需要了)

然后使用xshell进行远程登录即可!





猜你喜欢

转载自blog.csdn.net/csdnmmd/article/details/80063493