SSH修改默认22端口

。_饼干妹妹 提交于 2020-04-06 19:22:21

修改默认端口

  • vi /etc/ssh/sshd_config
默认端口是22,并且已经被注释掉了

Port 22000
  • iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22222 -j ACCEPT
  • iptables-save
  • 查看端口: iptables -nL --line-number
  • 重启sshd: systemctl restart sshd.service

使用非22端口登陆

  • ssh -p 22222 hadoop001
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!