0

I disabled root login and password login, changed port, used mosh for a while, but why I can login from a non-root user without password and private key?

Added some info from ssh -v, but I did not add option -i ~/ssh_keys/bandwagon_ssh_key

debug1: Server host key: RSA a4:11:29:3a:7a:...
debug1: Host '[104.224...]:28...' is known and matches the RSA host key.
debug1: Found key in ~/.ssh/known_hosts:13
...
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: ~/.ssh/github
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: ~/ssh_keys/bandwagon_ssh_key
3
  • Not enough information to help. Can you login as any user, or just a single user? Does this happen from any remote station, or all remote stations? It sounds like you have a no-password private-public pair set up on two stations, but we don't really know.
    – user459652
    Oct 23, 2015 at 13:40
  • Without password and without private key?
    – A.B.
    Oct 23, 2015 at 14:00
  • I support @jdv's suggestion about password-less private key.
    – yurikoles
    Oct 24, 2015 at 0:06

2 Answers 2

0

I am using a Macbook to login to an ubuntu server. The ssh-agent remembers the private keys.

Use ssh-add -l to list the keys, use ssh-add -d ~/ssh_keys/bandwagon_ssh_key to delete the key.

Actually I move away ~/ssh_keys/bandwagon_ssh_key, so I used ssh-add -D to delete all keys.

0

Because the server already knows your public key and you didn't set a password for the key. So it just lets you login. If one was to try this after setting it up as such from a machine that didn't have their keys uploaded it wouldn't let them connect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .