I got this all setup and working on my pi. I have my public key in:
/data/ssh/authorized_keys
And when I try to connect, it just gives me Connection Refused, as if the port isn't even open or ssh is not running.
Log:
OpenSSH_9.9p1 Ubuntu-3ubuntu3.1, OpenSSL 3.4.1 11 Feb 2025
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 19: Including file /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 172.20.132.58 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/skuld/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/skuld/.ssh/known_hosts2'
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to 172.20.132.58 [172.20.132.58] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: connect to address 172.20.132.58 port 22: Connection refused
ssh: connect to host 172.20.132.58 port 22: Connection refused
I double checked that is definitely it's IP address, but also the address I've been using to use adb with.
Edit:
Okay, so I finally looked more into this and wondered if it was just using generic sshd
So I found that it is there and installed to /vendor/bin/sshd
When I run this, however, I get:
/data/ssh/sshd_config: No such file or directory
So I think the default config never was written. Not sure how it's being enabled/disabled by the GUI, but it's just simply not starting. I'm looking into other things now.
Edit:
I did:
touch /data/ssh/sshd_config
And it was able to start from the GUI, however, I have no idea what the default config was for the OS, I don't remember deleting this, but with it missing, it's unable to start correctly. As in I cannot connect with an ssh key.
Maybe I can figure it out, but it would be helpful if someone has what that default sshd_config is suppose to look like.
Conclusion:
I was able to get it to work by adding this to sshd_config:
AuthorizedKeysFile /data/ssh/authorized_keys
PubkeyAuthentication yes
But it would still be helpful if someone shared a copy of what this was suppose to look like
I found these in:
/vendor/etc/ssh