For example if you have you private key stored in /user/jolouwer/backup_key for the server somehost.example.com you can use the following way to connect to this host. In our case we connect as the user dummy;
ssh -i /user/jolouwer/backup_key dummy@somehost.example.com
In this way it will read the specific key located in /user/jolouwer/backup_key and use this to connect tot he server. Now you can use this way to connect to every server you like however you will have to find a way to remember which key to use for which server. More easy is to list them in your ssh config.
You can do so by adding some config to ~/.ssh/config
For our example we should add the following 2 lines to the file;
Host somehost.example.com
IdentityFile /user/jolouwer/backup_key
this will ensure that the mentiond key is used every time you will connect from your workstation tot the somehost.example.com host.
No comments:
Post a Comment