diff --git a/README.md b/README.md index a2cf854..93a1971 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Saying Yes](unix/saying-yes.md) - [Search History](unix/search-history.md) - [Securely Remove Files](unix/securely-remove-files.md) +- [SSH With A Specific Key](unix/ssh-with-a-specific-key.md) - [SSH With Port Forwarding](unix/ssh-with-port-forwarding.md) - [Switch Versions of a Brew Formula](unix/switch-versions-of-a-brew-formula.md) - [Watch The Difference](unix/watch-the-difference.md) diff --git a/unix/ssh-with-a-specific-key.md b/unix/ssh-with-a-specific-key.md new file mode 100644 index 0000000..062a48c --- /dev/null +++ b/unix/ssh-with-a-specific-key.md @@ -0,0 +1,9 @@ +# SSH With A Specific Key + +When you SSH into another machine using public key authentication, the +key pair from either `~/.ssh/id_dsa`, `~/.ssh/id_ecdsa`, or `~/.ssh/id_rsa` +is used by default. This is generally what you want. But what if the target +server is expecting to identify you with a different SSH key pair? + +The `-i` option can be used with `ssh` to specify a different _identity +file_ when the default isn't what you want.