1

What should be the value of the -i option when login in using ssh?

I had previously supplied the public key ssh -i ~/.ssh/id_rsa.pub on an OpenBSD machine that worked but when trying to ssh into an Ubuntu machine I had to specify the location to my private key i.e ssh -i ~/.ssh/id_rsa to get in.

From reading the man page for ssh it says it should be the location of private key but then how come it worked previously on my BSD machine with only the public key?

3
-i identity_file

Selects a file from which the identity (private key)...

Please refer to the OpenSSH man page for more information. If using other ssh client / server, it may also provide a different result.


I don't know about *BSD, but I'm guessing, that it discarded your given public key, and negotiated automatically.

| improve this answer | |

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.