开发者社区 问答 正文

linux中修改ssh端口的方法是什么?

linux中修改ssh端口的方法是什么?

展开
收起
游客qzzytmszf3zhq 2021-12-05 17:10:37 422 分享 版权
1 条回答
写回答
取消 提交回答
  • [root@proxy ~]# vim /etc/ssh/sshd_config
    Port 999
    [root@proxy ~]# systemctl restart sshd
    [root@room9pc01 ~]#ssh root@192.168.4.5
    ssh: connect to host 192.168.1.41 port 22: Connection refused
    [root@room9pc01 ~]#ssh -p 999 root@192.168.4.5
    
    
    2021-12-05 17:10:52
    赞同 展开评论