How to use private key to log into ssh?

I have created a file /root/.ssh/authorized_keys on the GL-RM1. It contents both my RSA and ED25519 public keys.

# ls -lh /root/.ssh/authorized_keys 
-rw------- 1 root root 840 Jul 11 12:38 /root/.ssh/authorized_keys

However, it still asks my password when I ssh to it.

$ ssh [email protected]
[email protected]'s password:

Any pointer? Many thanks!

  1. Check the permissions on .ssh directory. They should be 700.
  2. Connect with "ssh -v" and check debug output for clues.
1 Like

@tward800

Thanks a ton. I have fixed it.