무슨 뜻이에요? ssh_exchange_identification: 원격 호스트에 의해 연결이 종료되었습니다.

무슨 뜻이에요? ssh_exchange_identification: 원격 호스트에 의해 연결이 종료되었습니다.

집에서 다른 곳에서 액세스할 수 있는 SSH 파일 서버를 만들려고 합니다. 현재 Arch Linux 커널 4.16.3-1-ARCH를 실행 중입니다. 다른 컴퓨터에서 LAN을 통해 쉽게 액세스할 수 있습니다.

bred@loaf:~$ ssh [email protected] -p 80
[email protected]'s password:

그러나 WAN을 통해 액세스하는 것은 더 어려웠습니다. 22번 포트가 막혀있는 것 같아서 80번 포트를 사용하려고 했습니다. 80이 열려 있는 걸 알아요ismyportopen.com. 제가 뭘 하고 있는지 잘 모르겠고, 아치 위키가 저를 실망시키는 것 같아요.

동일한 LAN에서 WAN을 통해 연결하려고 할 때 이 오류가 발생했습니다.

bred@loaf:~$ ssh [email protected] -vv -p 80
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2l  25 May 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "65.157.96.234" port 80
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 65.157.96.234 [65.157.96.234] port 80.
debug1: connect to address 65.157.96.234 port 80: Connection refused
ssh: connect to host 65.157.96.234 port 80: Connection refused

동일한 LAN에 있는 컴퓨터에서 WAN을 통해 연결을 시도하고, 호스트가 아닌 동일한 LAN 컴퓨터에서 VPN을 통해 연결을 시도하면 이 오류가 발생합니다.

bred@loaf:~$ ssh [email protected] -vv -p 80
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2l  25 May 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "65.157.96.234" port 80
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 65.157.96.234 [65.157.96.234] port 80.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bred/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
ssh_exchange_identification: Connection closed by remote host

다음은 주석 처리된 행을 제외한 호스트 시스템의 /etc/ssh/sshd_config 사본입니다.

AllowUsers landau
Port 80
ChallengeResponseAuthentication no
UsePAM yes
Subsystem       sftp    /usr/lib/ssh/sftp-server

내 호스트의 /etc/hosts.allow 및 /etc/hosts.deny는 기본적으로 존재하지 않습니다. sshd:ALL허용 파일에 추가했지만 도움이 되지 않는 것 같습니다.

관련 정보