[ SDF Public Access UNIX System .. Est. 1987 ]

join welcome faq status members projects store tour gopher abuse dialup minecraft social
tilde nihongo europa webmail gallery usermap irc tutorials telnet git ssh

Using an SSH agent to avoid typing your password

Do not use this tutorial until you make a unix account accessible via public key authentication following this tutorial.

Not only is typing your passphrase once convenient, you can make your password very complicated and only ever type an easy to remember passphrase to access all your accounts.

At the shell

At any time, you can type

ssh-agent /bin/ksh
ssh-add $HOME/private_key.rsa

(you can replace /bin/ksh by your favorite shell). Any command issued from then on that uses ssh to interact with a server that hosts your public key (e.g. ssh, sshfs, rsync) will not require a password e.g.

home_pc$ ssh-agent /bin/ksh
home_pc$ ssh-add $HOME/public_key.rsa
Enter passphrase for /home/user/public_key.rsa:
Identity added: /home/user/public_key.rsa (/home/user/public_key.rsa)
home_pc$ ssh miku.freeshell.org
miku$


Any Window Manager

Arrange to have

ssh-add $HOME/private_key.rsa

run at login (e.g. via $HOME/.xinitrc or as a "Startup Application in Gnome/KDE"). You should get a popup asking for your passphrase.

Gnome

KDE

Mac OS X

Windows

You may have to change your openssh formatted private key to PuTTY's .ppk format via PuTTYgen.

$Id: agent.html,v 1.3 2011/09/11 13:31:10 jbaber Exp $

©1987-2065 SDF Public Access UNIX System, Inc. 501(c)(7)
(this page was generated using ksh, sed and awk)