Cover V12, I01

Article
Figure 1
Figure 2
Figure 3
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Sidebar
Table 1

jan2003.tar

A Few Ways to Launch ssh-agent

1. To launch ssh-agent in the current shell, use back ticks for command substitution and the eval function of your shell. For example, in bash:

eval `ssh-agent`
If started this way, the authentication agent will run until explicitly killed. This is by far the most common method for invoking ssh-agent, but it can leave a lot of orphaned agents running on the system.

2. From the command line, you can start ssh-agent along with your X session as follows:

ssh-agent startx
When started with a command argument like this, the authentication agent will exit when the command exits. This generally keeps your process list cleaner, but can lead to deeply nested shells if used in other ways, such as running ssh-agent /bin/bash (or the like) from inside your xterms.

3. To automatically enable one authentication agent for all xterms opened during a single X session, and have it exit when you log out of X, you can modify your X window manager line in .xinitrc or .xsession to something similar to this example:

exec ssh-agent twm
This method is especially useful when using a display manager such as XDM, GDM, or KDM.

4. Under Red Hat Linux, you can automatically start ssh-agent with Gnome or KDE by replacing the last line in your .Xclients file (created by the switchdesk utility) with this:

exec /usr/bin/ssh-agent $HOME/.Xclients-default