Well, this happened.
[todd@nixos:~]$ scp ~/blog/*.md prose.sh:/
no public keys found for key provided
scp: Connection closed
So I tried to ssh to manage my account but it actually brought me to the new user registration and upon disconnecting would then give the same error.
[todd@nixos:~]$ ssh sillybit@prose.sh
prose.sh
a blog platform for hackers.
To get started, enter a username.
Then create a folder locally (e.g. ~/blog).
Then write your post in markdown files (e.g. hello-world.md).
Finally, send your files to us:
scp ~/blog/*.md prose.sh:/
Enter a username
> ______
OK Cancel
no public keys found for key provided
Connection to prose.sh closed.
Weird, I didn't change or lose my ssh keys.
Debugging #
So I add the verbose flag to my ssh command.
[todd@nixos:~/.ssh]$ ssh -v sillybit@prose.sh
OpenSSH_9.3p2, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 5: Applying options for *
debug1: Connecting to prose.sh [150.136.173.0] port 22.
debug1: Connection established.
debug1: identity file /home/todd/.ssh/id_rsa type 0
debug1: identity file /home/todd/.ssh/id_rsa-cert type -1
debug1: identity file /home/todd/.ssh/id_ecdsa type -1
debug1: identity file /home/todd/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/todd/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/todd/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/todd/.ssh/id_ed25519 type 3
debug1: identity file /home/todd/.ssh/id_ed25519-cert type -1
debug1: identity file /home/todd/.ssh/id_ed25519_sk type -1
debug1: identity file /home/todd/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/todd/.ssh/id_xmss type -1
debug1: identity file /home/todd/.ssh/id_xmss-cert type -1
debug1: identity file /home/todd/.ssh/id_dsa type -1
debug1: identity file /home/todd/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1
debug1: compat_banner: match: OpenSSH_7.6p1 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to prose.sh:22 as 'sillybit'
debug1: load_hostkeys: fopen /home/todd/.ssh/known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
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: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:lrDIkMPkXM/qbG5+N4TAINPIc64ART/FBd7gz1OE08g
debug1: load_hostkeys: fopen /home/todd/.ssh/known_hosts2: No such file or directory
debug1: Host 'prose.sh' is known and matches the ED25519 host key.
debug1: Found key in /home/todd/.ssh/known_hosts:2
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 2 keys
debug1: Will attempt key: /home/todd/.ssh/id_rsa RSA SHA256:QP4JSqJU3FmO1Q/Smfgt7ywz+UICMTyGctrgi3ukqM0 agent
debug1: Will attempt key: /home/todd/.ssh/id_ed25519 ED25519 SHA256:x8u6W/iO4JjXDzyPml6LD2UTWmYLPdPGrngCGbM0wT4 agent
debug1: Will attempt key: /home/todd/.ssh/id_ecdsa
debug1: Will attempt key: /home/todd/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/todd/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/todd/.ssh/id_xmss
debug1: Will attempt key: /home/todd/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss>
debug1: kex_input_ext_info: ping@openssh.com (unrecognised)
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/todd/.ssh/id_rsa RSA SHA256:QP4JSqJU3FmO1Q/Smfgt7ywz+UICMTyGctrgi3ukqM0 agent
debug1: Server accepts key: /home/todd/.ssh/id_rsa RSA SHA256:QP4JSqJU3FmO1Q/Smfgt7ywz+UICMTyGctrgi3ukqM0 agent
Authenticated to prose.sh ([150.136.173.0]:22) using "publickey".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem
no public keys found for key provided
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to prose.sh closed.
Transferred: sent 3588, received 4944 bytes, in 3.2 seconds
Bytes per second: sent 1119.6, received 1542.7
debug1: Exit status 1
So according to the verbose logs above, it offers my SHA RSA key first and
the server accepts the key but brings me to the special new
user sign-up
rather than using my Ed25519 key to login with my user account.
Fix #
It seems at the moment I have to specify my key / identity file now which is feels like a change considering I generated my different keys on the same day and swear I could ssh/scp without issue before.
[nix-shell:~/blog]$ exa -l ~/.ssh/
.rw------- 399 todd 12 Nov 15:59 id_ed25519
.rw-r--r-- 95 todd 12 Nov 15:59 id_ed25519.pub
.rw------- 2.7k todd 12 Nov 22:53 id_rsa
.rw-r--r-- 569 todd 12 Nov 22:53 id_rsa.pub
.rw------- 1.0k todd 14 Nov 23:37 known_hosts
.rw-r--r-- 182 todd 12 Nov 15:59 known_hosts.old
ssh sillybit@prose.sh -i ~/.ssh/id_ed25519
Cause #
I only recall these two changes before this happened.
- I created a new user account on my system with the same username, sillybit.
- I tried to use
rsync
instead ofscp
to copy to transfer files.
But I don't see how either of those would cause this seemingly new change in behavior.
[todd@nixos:~/blog]$ rsync /home/todd/blog/*.md prose.sh:/
no public keys found for key provided
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [sender=3.2.7]
[todd@nixos:~/blog]$ rsync /home/todd/blog/*.md prose.sh:/ -i /home/todd/.ssh/id_ed25519
Unexpected remote arg: prose.sh:/
rsync error: syntax or usage error (code 1) at main.c(1508) [sender=3.2.7]
So I am not sure if this is working as intended or if I did somehow muck something up. I am going to post this and try some testing next chance I get.
Or never, cause ya know.