User Tools

Site Tools


using_an_ssh_agent_to_avoid_typing_your_password

This is an old revision of the document!


Using an SSH agent to avoid typing your password

At the shell

At any time, you can type

example
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.

example
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 $ Using an SSH agent to avoid typing your password - traditional link (using RCS)

using_an_ssh_agent_to_avoid_typing_your_password.1616286792.txt.gz · Last modified: 2021/03/21 00:33 by hc9