1

I've had my Raspberry pi 4 setups for a while. Using it as a VPN, Plex, and basic WordPress host. I've been using SSH for a while and it worked fine.

I've recently caused an issue where immediately after connecting over SSH, my Raspi closes the connection. It is making it past the sshrc files (Post-login banner and Pushover notification script), but before I can even try to type anything, the connection closes with the output Connection reset by 10.0.1.175 port 22.

My terminal looks like this:

C:\Users\Will>ssh -v pi@10.0.1.175
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\Will/.ssh/config
debug1: Connecting to 10.0.1.175 [10.0.1.175] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_xmss type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Raspbian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Raspbian-10+deb10u2 pat OpenSSH* compact 0x04000000
debug1: Authenticating to 10.0.1.175:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:pgeWbOihxdzQSqUiZ/AXCAQjJk7Pk0E9qCt+Nl4y7+8
debug1: Host '10.0.1.175' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\Will/.ssh/known_hosts:8
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&                                                                &&&
&&&                    RasNas Server SSH Login                     &&&
&&&      Administered by Austin Milne [webmaster@awbmilne.ca]      &&&
&&&                                                                &&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:R+eugF39jwkr6eUd6ri3WV8d3oWaiS7DDsnsHNNeVMs Git@Gitlab.com Keepass SSH key
debug1: Authentications that can continue: publickey
debug1: Offering public key: RSA SHA256:l2tqycxVMZk2clE3PmaLP3j0dzIfHOHVlqBXpTMTlfE Git@Github.com Keepass SSH key
debug1: Authentications that can continue: publickey
debug1: Offering public key: RSA SHA256:bCiNMPY3j3LsKaQV3WmOZs9q3pY0m5On9mkrNQEudCQ Will@Keepass Servers SSH key
debug1: Server accepts key: pkalg rsa-sha2-512 blen 533
debug1: Authentication succeeded (publickey).
Authenticated to 10.0.1.175 ([10.0.1.175]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: console supports the ansi parsing
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Remote: /home/pi/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/pi/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Requesting authentication agent forwarding.
Linux RasNas 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l
You have new mail.
Last login: Wed Aug  5 15:27:09 2020 from 10.0.1.1

───────────────────── Login Message (redacted for length) . . Logged in using SSH key: Will@Keepass ─────────────────────

Connection reset by 10.0.1.175 port 22

This last line is all I can see that indicated whats happening.

Here is the Auth log:

Aug  5 15:40:56 RasNas sshd[24709]: rexec line 122: Deprecated option RSAAuthentication
Aug  5 15:40:56 RasNas sshd[24709]: reprocess config line 122: Deprecated option RSAAuthentication
Aug  5 15:40:56 RasNas sshd[24709]: Accepted publickey for pi from 10.0.1.1 port 50296 ssh2: RSA SHA256:bCiNMPY3j3LsKaQV3WmOZs9q3pY0m5On9mkrNQEudCQ
Aug  5 15:40:56 RasNas sshd[24709]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Aug  5 15:40:56 RasNas systemd-logind[428]: New session c18 of user pi.

And the Sys log:

Aug  5 15:43:25 RasNas dhclient[18281]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
Aug  5 15:43:39 RasNas dhclient[18281]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
Aug  5 15:43:50 RasNas systemd[1]: Started Session c20 of user pi.
Aug  5 15:43:52 RasNas dhclient[18281]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16

and fail2ban log:

2020-08-04 20:53:05,422 fail2ban.server         [692]: INFO    --------------------------------------------------
2020-08-04 20:53:05,446 fail2ban.server         [692]: INFO    Starting Fail2ban v0.10.2
2020-08-04 20:53:05,500 fail2ban.database       [692]: INFO    Connected to fail2ban persistent database '/var/lib/fail2ban/fail2ban.sqlite3'
2020-08-04 20:53:05,505 fail2ban.jail           [692]: INFO    Creating new jail 'sshd'
2020-08-04 20:53:05,835 fail2ban.jail           [692]: INFO    Jail 'sshd' uses pyinotify {}
2020-08-04 20:53:05,847 fail2ban.jail           [692]: INFO    Initiated 'pyinotify' backend
2020-08-04 20:53:05,849 fail2ban.filter         [692]: INFO      maxLines: 1
2020-08-04 20:53:05,954 fail2ban.server         [692]: INFO    Jail sshd is not a JournalFilter instance
2020-08-04 20:53:05,967 fail2ban.filter         [692]: INFO    Added logfile: '/var/log/auth.log' (pos = 471849, hash = fe94db141fbc2c63dd9e333a2c51e22a834b9d67)
2020-08-04 20:53:05,976 fail2ban.filter         [692]: INFO      encoding: UTF-8
2020-08-04 20:53:05,977 fail2ban.filter         [692]: INFO      maxRetry: 5
2020-08-04 20:53:05,978 fail2ban.filter         [692]: INFO      findtime: 600
2020-08-04 20:53:05,979 fail2ban.actions        [692]: INFO      banTime: 600
2020-08-04 20:53:05,996 fail2ban.jail           [692]: INFO    Jail 'sshd' started
2020-08-04 21:46:12,736 fail2ban.filter         [692]: INFO    [sshd] Found 65.49.20.68 - 2020-08-04 21:46:12
2020-08-05 03:32:52,393 fail2ban.filter         [692]: INFO    [sshd] Found 14.248.24.139 - 2020-08-05 03:32:52
2020-08-05 04:03:19,238 fail2ban.filter         [692]: INFO    [sshd] Found 171.235.90.41 - 2020-08-05 04:03:19
2020-08-05 04:20:08,692 fail2ban.filter         [692]: INFO    [sshd] Found 168.205.124.246 - 2020-08-05 04:20:08
2020-08-05 04:20:11,773 fail2ban.filter         [692]: INFO    [sshd] Found 168.205.124.246 - 2020-08-05 04:20:11
2020-08-05 04:20:16,266 fail2ban.filter         [692]: INFO    [sshd] Found 168.205.124.246 - 2020-08-05 04:20:16
2020-08-05 04:20:17,394 fail2ban.filter         [692]: INFO    [sshd] Found 168.205.124.246 - 2020-08-05 04:20:17
2020-08-05 04:20:18,962 fail2ban.filter         [692]: INFO    [sshd] Found 168.205.124.246 - 2020-08-05 04:20:18
2020-08-05 04:20:19,360 fail2ban.actions        [692]: NOTICE  [sshd] Ban 168.205.124.246
2020-08-05 04:30:18,348 fail2ban.actions        [692]: NOTICE  [sshd] Unban 168.205.124.246
2020-08-05 06:00:53,325 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.14 - 2020-08-05 06:00:53
2020-08-05 06:01:00,405 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.229 - 2020-08-05 06:01:00
2020-08-05 06:01:13,046 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.14 - 2020-08-05 06:01:13
2020-08-05 06:01:18,754 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.229 - 2020-08-05 06:01:18
2020-08-05 06:01:31,569 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.14 - 2020-08-05 06:01:31
2020-08-05 06:01:37,710 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.229 - 2020-08-05 06:01:37
2020-08-05 06:02:09,324 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.14 - 2020-08-05 06:02:09
2020-08-05 06:02:15,639 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.229 - 2020-08-05 06:02:15
2020-08-05 06:02:29,535 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.14 - 2020-08-05 06:02:29
2020-08-05 06:02:30,110 fail2ban.actions        [692]: NOTICE  [sshd] Ban 37.49.230.14
2020-08-05 06:02:34,345 fail2ban.filter         [692]: INFO    [sshd] Found 37.49.230.229 - 2020-08-05 06:02:34
2020-08-05 06:02:34,451 fail2ban.actions        [692]: NOTICE  [sshd] Ban 37.49.230.229
2020-08-05 06:12:29,367 fail2ban.actions        [692]: NOTICE  [sshd] Unban 37.49.230.14
2020-08-05 06:12:35,456 fail2ban.actions        [692]: NOTICE  [sshd] Unban 37.49.230.229
2020-08-05 06:40:46,495 fail2ban.filter         [692]: INFO    [sshd] Found 185.153.196.230 - 2020-08-05 06:40:46
2020-08-05 06:40:54,601 fail2ban.filter         [692]: INFO    [sshd] Found 185.153.196.230 - 2020-08-05 06:40:54
2020-08-05 06:41:08,438 fail2ban.filter         [692]: INFO    [sshd] Found 185.153.196.230 - 2020-08-05 06:41:08
2020-08-05 06:41:16,961 fail2ban.filter         [692]: INFO    [sshd] Found 185.153.196.230 - 2020-08-05 06:41:16
2020-08-05 06:41:28,033 fail2ban.filter         [692]: INFO    [sshd] Found 185.153.196.230 - 2020-08-05 06:41:28
2020-08-05 06:41:28,313 fail2ban.actions        [692]: NOTICE  [sshd] Ban 185.153.196.230
2020-08-05 06:51:29,280 fail2ban.actions        [692]: NOTICE  [sshd] Unban 185.153.196.230
2020-08-05 11:18:35,846 fail2ban.filter         [692]: INFO    [sshd] Found 185.132.53.227 - 2020-08-05 11:18:35
2020-08-05 11:19:02,503 fail2ban.filter         [692]: INFO    [sshd] Found 185.132.53.227 - 2020-08-05 11:19:02
2020-08-05 11:19:29,951 fail2ban.filter         [692]: INFO    [sshd] Found 185.132.53.227 - 2020-08-05 11:19:29
2020-08-05 11:20:58,751 fail2ban.filter         [692]: INFO    [sshd] Found 185.132.53.227 - 2020-08-05 11:20:58
2020-08-05 11:21:26,611 fail2ban.filter         [692]: INFO    [sshd] Found 185.132.53.227 - 2020-08-05 11:21:26
2020-08-05 11:21:27,165 fail2ban.actions        [692]: NOTICE  [sshd] Ban 185.132.53.227
2020-08-05 11:31:26,058 fail2ban.actions        [692]: NOTICE  [sshd] Unban 185.132.53.227

But none seem to have any useful information to me...

I have looked through the other posts and tried their suggestions to no avail:

  • Clearing Fail2Ban jail
  • Checking for SSH allow and block definitions (neither exist)
  • etc.

I use keypasswith KeyAgent for hosting my SSH keys (mimics Pageant). This has worked fine in the past, but has suddenly stopped working.

I did make some changes to my server, but they were related to plex and shouldnt make a difference to the SSH setup.

It seems like it is running ssh [ip] [command] of some sort, because that is what the return seems like.

Also, here is the output from ssh -vvv:

PS C:\Users\Will> ssh -vvv pi@10.0.1.175
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/Will/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 10.0.1.175 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 10.0.1.175 [10.0.1.175] port 22.
debug1: Connection established.
debug3: Failed to open file:C:/Users/Will/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_rsa type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/Will/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/Will/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Will/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Raspbian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Raspbian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 10.0.1.175:22 as 'pi'
debug3: hostkeys_foreach: reading file "C:\\Users\\Will/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\Will/.ssh/known_hosts:8
debug3: load_hostkeys: loaded 1 keys from 10.0.1.175
debug3: Failed to open file:C:/Users/Will/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:pgeWbOihxdzQSqUiZ/AXCAQjJk7Pk0E9qCt+Nl4y7+8
debug3: hostkeys_foreach: reading file "C:\\Users\\Will/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\Will/.ssh/known_hosts:8
debug3: load_hostkeys: loaded 1 keys from 10.0.1.175
debug3: Failed to open file:C:/Users/Will/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug1: Host '10.0.1.175' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\Will/.ssh/known_hosts:8
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug2: key: Git@Gitlab.com Keepass SSH key (0000019D433904C0), agent
debug2: key: Git@Github.com Keepass SSH key (0000019D43390220), agent
debug2: key: Will@Keepass Servers SSH key (0000019D43390290), agent
debug2: key: Git@Gitlab.awbmilne.ca Keepass SSH key (0000019D4338FEA0), agent
debug2: key: C:\\Users\\Will/.ssh/id_rsa (0000000000000000)
debug2: key: C:\\Users\\Will/.ssh/id_dsa (0000000000000000)
debug2: key: C:\\Users\\Will/.ssh/id_ecdsa (0000000000000000)
debug2: key: C:\\Users\\Will/.ssh/id_ed25519 (0000000000000000)
debug2: key: C:\\Users\\Will/.ssh/id_xmss (0000000000000000)
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 53
debug3: input_userauth_banner
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&                                                                &&&
&&&                    RasNas Server SSH Login                     &&&
&&&      Administered by Austin Milne [webmaster@awbmilne.ca]      &&&
&&&                                                                &&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:R+eugF39jwkr6eUd6ri3WV8d3oWaiS7DDsnsHNNeVMs Git@Gitlab.com Keepass SSH key
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug1: Offering public key: RSA SHA256:l2tqycxVMZk2clE3PmaLP3j0dzIfHOHVlqBXpTMTlfE Git@Github.com Keepass SSH key
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug1: Offering public key: RSA SHA256:bCiNMPY3j3LsKaQV3WmOZs9q3pY0m5On9mkrNQEudCQ Will@Keepass Servers SSH key
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: pkalg rsa-sha2-512 blen 533
debug2: input_userauth_pk_ok: fp SHA256:bCiNMPY3j3LsKaQV3WmOZs9q3pY0m5On9mkrNQEudCQ
debug3: sign_and_send_pubkey: RSA SHA256:bCiNMPY3j3LsKaQV3WmOZs9q3pY0m5On9mkrNQEudCQ
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to 10.0.1.175 ([10.0.1.175]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug1: console supports the ansi parsing
debug3: Successfully set console output code page from:437 to 65001
debug3: Successfully set console input code page from:437 to 65001
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug3: receive packet: type 4
debug1: Remote: /home/pi/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /home/pi/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Linux RasNas 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l
You have new mail.
Last login: Wed Aug  5 16:02:43 2020 from 10.0.1.1
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98

===========================================================

██████╗ █████╗ ███████╗███╗ ██╗ █████╗ ███████╗ ██╔══██╗██╔══██╗██╔════╝████╗ ██║██╔══██╗██╔════╝ ██████╔╝███████║███████╗██╔██╗ ██║███████║███████╗ ██╔══██╗██╔══██║╚════██║██║╚██╗██║██╔══██║╚════██║ ██║ ██║██║ ██║███████║██║ ╚████║██║ ██║███████║ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ########################################################## ##########################################################

Logged In as pi to RasNas terminal

Date: Wed 05 Aug 2020 04:02:53 PM EDT

 Hostname:   RasNas
 CPU Model:  ARMv7 Processor rev 3 (v7l)

 Total Memory:         3919812 kB
 Free Memory:           539800 kB

 Swap Total:            102396 kB
 Swap Free:             102396 kB

 Root Usage:        28.3GB/114.8GB (22.6%)

===========================================================

Logged in using SSH key: Will@Keepass debug3: recv - from CB ERROR:10054, io:0000019D433907F0 debug3: send packet: type 1 debug3: send - WSASend() ERROR:10054, io:0000019D433907F0 Connection reset by 10.0.1.175 port 22

Anybody have suggestions for how fix this?

LilData777
  • 311
  • 2
  • 15
Awbmilne
  • 126
  • 1
  • 5

4 Answers4

1

EDIT: This only seemed to fix the problem temporarily!

FOUND THE SOLUTION!

It seems it was an issue with the router. My DHCP IP range was set to be 10.0.1.100-10.0.1.200. This seemed to cause an issue with how the router handled the traffic between devices and would drop connections.

I set the DHCP range to 10.0.1.2-10.0.1.202 and it seems to work fine now.

Thanks for the help!

Awbmilne
  • 126
  • 1
  • 5
0

Have you ruled out IP address conflict - some other computer on your network using the same IP address as the Pi? "Connection reset" is often a symptom of IP address conflict. For example, you could run Wireshark on your Windows host and watch the MAC addresses of the packets using the 10.0.1.175 address.

Waxrat
  • 556
  • 4
  • 2
0

I never did find an answer to this problem.

I eventually fresh-installed the server and reconfigured it (Switching to containerized hosts)

This solved the issue... But not sure what the issue was

Awbmilne
  • 126
  • 1
  • 5
0

For me, I tailed the auth.log, tried to ssh in, and found that sshd was unhappy because there were no /etc/ssh/ssh_host_* files. Fixed as follows:

ssh pi@localhost   #this fails
tail /var/log/auth.log      #this tells me the problem
ls -l /etc/ssh/ssh_host_*    #this confirms that these files are all empty
sudo rm /etc/ssh/ssh_host_*  #this removes the empty files
sudo ssh-keygen -A           #this generates new ssh_host_* files
ssh pi@localhost   #this works now
russ
  • 1
  • 1