SSH 오류 kex_exchange_identification: 읽기: 피어에 의한 연결 재설정

SSH 오류 kex_exchange_identification: 읽기: 피어에 의한 연결 재설정

라즈베리 파이에서 wsl2로 ssh를 할 때 문제가 있습니다.

Windows 시스템에서 포트 2222를 wsl2로 전달하는 규칙을 만들고 포트 2222에서 트래픽을 허용하는 인바운드 방화벽 규칙을 설정했습니다.

이것은 이 명령을 실행할 때 SSH 디버깅의 출력입니다.

ssh riccardoob@[windows ip] -p 2222 -vvv

OpenSSH_8.4p1 Ubuntu-5ubuntu1.1, OpenSSL 1.1.1j  16 Feb 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/ubuntu/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/ubuntu/.ssh/known_hosts2'
debug2: resolving "[domain name]" port 2222
debug2: ssh_connect_direct
debug1: Connecting to [domain name] [ip] port 2222.
debug1: Connection established.
debug1: identity file /home/ubuntu/.ssh/id_rsa type -1
debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_dsa type -1
debug1: identity file /home/ubuntu/.ssh/id_dsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ed25519 type -1
debug1: identity file /home/ubuntu/.ssh/id_ed25519-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ed25519_sk type -1
debug1: identity file /home/ubuntu/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_xmss type -1
debug1: identity file /home/ubuntu/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Ubuntu-5ubuntu1.1
kex_exchange_identification: read: Connection reset by peer
Connection reset by [ip] port 2222

실망스럽게도 연결이 올바르게 설정되었고 서버도 올바르게 설정되었습니다. 동일한 라즈베리 파이에서 wsl로 ssh를 실행할 수 있음을 지정해야 하는데 갑자기 이 오류가 나타나기 시작하고 불행히도 마지막 연결 성공 이후 무엇을 했는지 알 수 없습니다.

이 문제를 가장 잘 디버깅하기 위해 추가 정보가 필요한지 문의하세요.

편집: 여기서 찾은 스레드에서 제안한 대로 wsl이 연결된 네트워크 외부에서 이것을 시도했지만 비슷한 오류가 발생했습니다.

ssh_exchange_error: connection closed by peer

관련 정보