ssh 修改默認端口
[root@node-1 ~]# vi /etc/ssh/sshd_config
修改port 為 5522
重啟
[root@node-1 ~]# systemctl restart sshd
查看
[root@node-1 ~]# netstat -ntlp | grep sshd
ssh 添加監聽端口
[root@node-1 ~]# vi /etc/ssh/sshd_config
關閉SELinux
# 臨時關閉
[root@node-1 ~]# setenforce 0
# 永久關閉
[root@node-1 ~]# vim /etc/selinux/config
--------------------修改配置------------------------
SELINUX=disabled
重啟
[root@node-1 ~]# systemctl restart sshd
查看
[root@node-1 ~]# netstat -ntlp | grep sshd
登錄
ssh root@192.168.0.101 -p 5522