一、配置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
