我正在尝试将 ssh 端口从 22 更改为 1111。我已采取以下步骤,但无法做到。
输出:
ste*_*ver 10
您编辑的文件,/etc/ssh/ssh_config是全球SSH客户端配置文件-更改端口也将改变该端口ssh(和scp)程序试图连接到。
要更改服务器侦听的端口上,则需要修改/etc/ssh/sshd_config:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
Run Code Online (Sandbox Code Playgroud)