I am working on getting headless Raspberry Pi running Ubuntu Server 25.04. I haven't done this in a while and... passwords are no longer a thing, which is frustrating, but understandable.
I have generated the pub key on Ubuntu and have copied it over to my Windows machine. I want to simply use Windows' built-in ssh to connect. I would love to know why the Windows machine is resetting my connection, not the Linux machine.
Some highlights from the Log:
debug1: Host '(censored)' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\(censored)/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: Will attempt key: authorized_keys ED25519 SHA256: (censored) explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: authorized_keys ED25519 SHA256:(censored) explicit
debug1: Server accepts key: authorized_keys ED25519 SHA256: (censored) explicit
Load key "authorized_keys": invalid format
debug1: No more authentication methods to try.
(censored): Permission denied (publickey).
Looking at the logs on the Linux machine:
sshd-session[*]: Connection reset by authenticating user (username) (IP) port 50028 [preauth]
Still, I would love to know why PasswordAuthentication yes
in /etc/ssh/ssh_config
doesn't work in this situation.
Some Troubleshooting
Killed the known_servers on both sides to remove any residue.
I have run the ssh commands locally to the linux machine to verify that the .pub
file that I pushed into authorized_keys
was working correctly.
I've made sure to use a "Linux friendly" text editor for Linux CR/LF, just in case that was a problem on the Window's side. However, I haven't changed permissions for the file.
Looked for ways to pass authorization_keys on the Windows side to ssh, and it appears to have worked, but it is still complaining that the authorization_keys file is an invalid format. (Yet it reads it and pulls out the appropriate key?)
I'd like to avoid installing OpenSSH, but ... if that's the answer, I guess that's where I'll have to go.
Much appreciated.