查看sshd状态
systemctl status sshd
修改配制文件(/etc/ssh/sshd_config)
# vim /etc/ssh/sshd_config
Port 7722
#AddressFamily any
ListenAddress 0.0.0.0
ListenAddress ::
PermitRootLogin yes
PasswordAuthentication yes
启动ssh服务
systemctl start sshd
问题排查
启动失败,使用sshd -t检查,但并未打印出什么内容,需修改文件
# vim /etc/selinux/config
#SELINUX=enforcing
SELINUX=disabled
之后重启服务器
reboot
再这之后客户端连接超时,遂关闭防火墙
systemctl status firewalld