Skip to main content

openssh - Howto force ssh to use a specific private key?


With ssh -i you can instruct ssh to use an extra private key to try authentication.


The documentation is not clear on how to explicitly use only that key.



Answer



You can use the IdentitiesOnly option:


ssh -o "IdentitiesOnly=yes" -i


Comments