用于 SSH 的 Ubuntu 服务器自定义端口

Web*_*net 1 ubuntu ssh

我已经/etc/ssh/ssh_config在我的 ubuntu-server 安装中为 SSH 定义了一个自定义端口,并且在重新启动服务器后它仍然在端口 22 上接受 SSH。

除了......还有什么我需要做的吗?

Host *

PermitRootLogin no

   Port 6685
   Protocol 2,1
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no
Run Code Online (Sandbox Code Playgroud)

Zor*_*che 12

您正在寻找的配置是/etc/ssh/sshd_config. ssh_config 文件用于 ssh 客户端。