Cannot SSH into debian instance using default host key
by iicapn from LinuxQuestions.org on (#5MAQJ)
This has been baffling me... I have a brand new debian instance (tested on 10 and 11). I know that when you install the openssh server with apt install openssh-server, it creates a set of default host keys at /etc/ssh like ssh_host_ed25519_key and ssh_host_ed25519_key.pub, etc.
I was under the impression that those keys were valid for accessing the box... so if I copied ssh_host_ed25519_key to my local machine, I could use that as the private key and connect to the box as root (assuming sshd_config allows for root to log in).
Instead when I try, it's rejected...
Any help understanding this issue would be much appreciated! Thank you!
p.s. during testing, I have set it so that I can log into root with the password, so I can get into the box, but ordinarily I disable password auth.
I was under the impression that those keys were valid for accessing the box... so if I copied ssh_host_ed25519_key to my local machine, I could use that as the private key and connect to the box as root (assuming sshd_config allows for root to log in).
Instead when I try, it's rejected...
Any help understanding this issue would be much appreciated! Thank you!
p.s. during testing, I have set it so that I can log into root with the password, so I can get into the box, but ordinarily I disable password auth.