SSH: use specific key when logging in

Two ways:

  1. Specify the key in your ssh command, something like "ssh -i ~/.ssh/petri server.example.com"

  2. Create a .ssh/config file with something like:

Host *

IdentityFile /home/petri/.ssh/petri

For more options, do a "man ssh_config" or "man ssh", depending on which you want to do.


Try this:

ssh -i /path/to/petri