Linux SSH 更换登录端口

登录到服务器的,然后修改/etc/ssh/sshd_config 配置,添加新的一行:

Port 123

后边按个数字就是自己设定的端口号。在这个文件中有一行注释掉的

#Port 22

也可以将#去掉,然后将数字换掉,意义一样。

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.