sshd: Connection reset by IP [preauth]

Initial Post here (closed as not relevant to ServerFault)

I have a raspberry pi with only Key based authentication enabled. When I try to ssh to it using the local IP, it works. But when I try to connect it using a noip domain (dynamic dns), I get Connection reset by <IP>: [preauth] instantly.

Things to know:

  1. I've changed the default port from 22 to another in /etc/ssh/sshd_config and yes the new port has been forwarded.
  2. I've restarted the pi and the sshd service.
  3. I've tried changing up the private/public key pair.
  4. I've tried tailing the /var/log/auth.log file when I try to connect via ddns and all it gives me is the Connection reset [preauth] error
  5. I have a static IP

What works: If I disconnect from my ISP and ssh via my phone hotspot, it works.

What I think: It's the static IP issue? I don't have much knowledge on the matter but as a lay-person I can understand that there might be an issue with the RSA fingerprint or something?

Any help would be appreciated! Thanks.

Logs (sensitive info redacted):

=> ssh -vi ~/.ssh/key <USER>@<DDNS> -p <PORT>
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/kunalnagar/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to <DDNS> port <PORT>.
debug1: Connection established.
debug1: identity file key type 0
debug1: identity file key-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
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
debug1: Authenticating to <DDNS:PORT> as '<USER>'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by <STATIC_IP> port xxxx
3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like