我正在尝试设置家庭服务器。我希望能够从非本地源 ssh 进入它,所以我设置了 noip。目前,noip 的端口检查器显示 ip 上的端口 22 已打开并正在运行,我可以通过本地 IP 地址 ssh 进入服务器。当我尝试使用给定的非本地连接进行 ssh 时,我要么收到远程主机错误关闭的连接,要么收到对等错误关闭的连接。任何对此的帮助将不胜感激。
ssh -p 22 "Merthew.ddns.net" -v
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to merthew.ddns.net [208.87.51.60] port 22.
debug1: Connection established.
debug1: identity file /home/alephnull/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/alephnull/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: Connection closed by remote host