ssh/id_rsa): ENTER
Key has comment '/home/chris/.ssh/id_rsa'
Enter new passphrase (empty for no passphrase): TOPsecret
Enter same passphrase again: TOPsecret
Your identification has been saved with the new passphrase.
If you make only this change, then you will be prompted for your passphrase every
time you use ssh to connect to red:
blue$ ssh red
Enter passphrase for key '/home/chris/.ssh/id_rsa': TOPsecret
red$
13.15
192 Chapter 13: Remote Access
To set things up so that you are only prompted for the passphrase once per session,
execute ssh-agent and ssh-add during session startup. There are many different
places you can place these two commands??”startx, xinitrc, ~/.kde/env/ssh.sh, and
others??”but the easiest place to put them is probably at the end of your shell startup
script (~/.bash_profile for bash users, ~/.profile for sh, ksh, ash, and zsh users, or ~/
.login for csh users).
The two lines to add are:
eval $(ssh-agent)
ssh-add
(Users with a genuine old-school Bourne shell??”both of you!??”should substitute
`ssh-agent` for $(ssh-agent). )
Or, for CSH users:
eval `ssh-agent -c`
ssh-add
These two lines will be executed when you log in using character mode or start a session
using a display manager.
Pages:
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299