当我打开我的PC (Ubuntu19.04)并尝试在我的ssh服务器(Raspbian )中第一次登录时,我得到了write: connection reset by peer:
trp@trp-pc:~$ ssh -vvv pi@192.168.2.251
OpenSSH_7.9p1 Ubuntu-10, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.2.251 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.2.251 [192.168.2.251] port 22.
debug1: Connection established.
debug1: identity file /home/trp/.ssh/id_rsa type 0
debug1: identity file /home/trp/.ssh/id_rsa-cert type -1
debug1: identity file /home/trp/.ssh/id_dsa type -1
debug1: identity file /home/trp/.ssh/id_dsa-cert type -1
debug1: identity file /home/trp/.ssh/id_ecdsa type -1
debug1: identity file /home/trp/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/trp/.ssh/id_ed25519 type -1
debug1: identity file /home/trp/.ssh/id_ed25519-cert type -1
debug1: identity file /home/trp/.ssh/id_xmss type -1
debug1: identity file /home/trp/.ssh/id_xmss-cert type -1
write: Connection reset by peer但是,如果我ping服务器或尝试ssh两次,我得到连接和一切完美运作(没有断开等)。我可以与服务器进行多个ssh会话。如果我重新启动我的PC,问题再次出现(第一次登录尝试)。
更新1:我检查了日志(auth.log),但是即使使用LogLevel DEBUG3,失败的登录尝试也不存在。
更新2:我试图指定Mac、Kex和Key,但没有什么改变(ssh -o KexAlgorithms=diffie-hellman-group16-sha512 -o MACS=umac-128-etm@openssh.com -o HostbasedKeyTypes=ssh-rsa -c aes192-ctr)
发布于 2019-09-07 17:58:21
问题是我的路由器/调制解调器。我将地址池改为默认地址池(从.2改为.254 ),删除了服务器的静态ip (这是我在路由器/调制解调器设置中设置的),连接到服务器并设置了静态ip。现在一切都进展顺利。
https://askubuntu.com/questions/1170871
复制相似问题