修改ssh端口号
vi /etc/ssh/sshd_config
找到
#Port 22
修改为:
Port 2012 //修改为你想要的端口号就OK了
然后重起ssh服务,使修改生效.
/etc/init.d/sshd restart
# Centos 6.x
systemctl restart sshd.service
# Centos 7.x
/etc/init.d/ssh restart
# Debian
vi /etc/ssh/sshd_config
找到
#Port 22
修改为:
Port 2012 //修改为你想要的端口号就OK了
然后重起ssh服务,使修改生效.
/etc/init.d/sshd restart
# Centos 6.x
systemctl restart sshd.service
# Centos 7.x
/etc/init.d/ssh restart
# Debian