写个笔记……以免今后再出现问题,好及时解决。
vi /etc/ssh/sshd_config
修改配置
修改的内容:
port 22
PermitRootLogin yes
PasswordAuthentication yes
service ssh start
开启ssh服务
service ssh status
查看ssh服务状态
update-rc.d ssh enable
将ssh服务添加到开机自启
如果一旦配置出了错误,一直出现:
Job for ssh.service failed because the control process exited with error code.
See “systemctl status ssh.service” and “journalctl -xe” for details.
那就运行 /usr/sbin/sshd -T
,就可查找到错误,进行修改就欧克