Days ago, by mistake I ran

$ ssh user@foo_hostmachine -i .ssh/id_rsa

instead of

$ ssh user@foo_hostmachine -i .ssh/id_rsa.pub

Do you think that my private key has been exposed to the Internet and I must change the private/public keys as soon as possible?

  • 2
    by mistake? precisely you need to use the private key (id_rsa in this case) for the -i – eez0 Dec 27 '16 at 11:01

No threats to your keys due to that command. In fact with "-i" you select the file from which the identity (private key) for public key authentication is read.

Said that .ssh/id_rsa is the default value if you don't use the "-i", unless you generated multiple keys (check your ~/.ssh directory for files names identity, id_dsa, id_ecdsa or id_ed25519)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.