Kali 2017 使用SSH进行远程登录 设置 ssh 开机自启动

一、配置SSH参数

修改sshd_config文件,命令为:

vi /etc/ssh/sshd_config

输入“ /Pass ”回车搜索   

找到#PasswordAuthentication no的注释去掉,按 i 进入编辑模式,将注释#去掉并且将NO修改为YES   //kali中默认是yes

输入“ /PermitR ”回车搜索

找到#PermitRootLogin without-password修改为

PermitRootLogin yes

然后,按ESC返回命令行 输入:wq! 回车保存,退出vim。

 

二、启动SSH服务

添加开机自启动命令   update-rc.d ssh enable

关闭则为:update-rc.d ssh disabled

 自启动需要重启生效

注:现在关闭报错,暂时没有找到方法。开机自启动命令有效!

命令为:

/etc/init.d/ssh start 

或者

service ssh start

查看SSH服务状态是否正常运行,命令为:

/etc/init.d/ssh status

或者

service ssh status

 
 
 
____author___JayeHe
原文地址:https://www.cnblogs.com/yxy666/p/9605777.html