sshkey
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
sshkey [2011/04/05 14:05] – cangiani | sshkey [2011/04/05 14:57] – cangiani | ||
---|---|---|---|
Line 27: | Line 27: | ||
From now, every time you connet to a server, the server will recognize your workstation automatically (it read the ~/ | From now, every time you connet to a server, the server will recognize your workstation automatically (it read the ~/ | ||
+ | |||
+ | In fact, since your private key is encrypted, you need to type the password to decrypt it each time you want to use it. Seems like we have just replaced the "enter remote machine password" | ||
==== Setup ssh-agent ==== | ==== Setup ssh-agent ==== | ||
- | In fact, since your private key is encrypted, | + | Ssh-agent is a program that keeps in memory |
+ | |||
+ | === On desktop sessions === | ||
+ | All modern desktop environment (os X, Gnome, KDE), do take care automatically the ssh key decryption business and you don't have to do anything. Yahoo! | ||
+ | |||
+ | === On console === | ||
+ | If you are not on a full desktop environment (e.g. if you ssh to a machine from where you want to connect to [several] another machines), then you have to setup the ssh-agent business by hand. | ||
+ | |||
+ | The two (actually three) steps are | ||
+ | * launch | ||
+ | |||
+ | $ eval `ssh-agent -s` | ||
+ | |||
+ | * ask '' | ||
+ | |||
+ | $ ssh-add [-t time_in_seconds] ~/.ssh/ | ||
+ | |||
+ | * before logging out you have to remember to kill the ssh-agent: | ||
+ | |||
+ | $ ssh-agent -k | ||
+ | |||
+ | Since this is quite cumbersome, I suggest to add the following to your '' | ||
+ | |||
+ | < | ||
+ | # only for interactive shell | ||
+ | if [ " | ||
+ | # run ssh agent if not already running | ||
+ | SSHAGENT=/ | ||
+ | if [ -z " | ||
+ | eval `$SSHAGENT -s` | ||
+ | alias ssh=' | ||
+ | trap " | ||
+ | fi | ||
+ | fi | ||
+ | </ | ||
- | Ssh-agent | + | This will start '' |
- | Let's set it up. |
sshkey.txt · Last modified: 2022/08/05 11:20 by admin