Here's how I set it up using
x11-ssh-askpass:
First download, unpack, compile and install x11-ssh-askpass:
Code:
wget h++p://www.jmknoble.net/software/x11-ssh-askpass/x11-ssh-askpass-1.2.4.1.tar.gz
tar zxvf x11-ssh-askpass-1.2.4.1.tar.gz
cd x11-ssh-askpass-1.2.4.1
./configure && xmkmf && make includes && make && make install && make install.man
Now we need edit /etc/X11/xinit/xinitrc. Add this before where your desktop gets started at the bottom:
Code:
# Register the SSH keys with ssh-agent
ssh-add < /dev/null
# Start the window manager:
startkde
If you use Gnome instead of KDE, then it would be:
Code:
# Register the SSH keys with ssh-agent
ssh-add < /dev/null
# Start the window manager:
exec gnome-session
Now we need to set the SSH_ASKPASS environment variable and set an alias for startx on startup. There are a couple options here. If you want it to be system wide, ie everyone who uses the box gets prompted, then add the below code to /etc/profile. Otherwise if you're not going to setup keys for anyone else then you can just add it to your ~/.bash_profile or ~/.bashrc file. Here's the code to add:
Code:
# Start X as a under ssh-agent
alias startx="ssh-agent startx"
# Set the location of the x11-ssh-askpass binary
export SSH_ASKPASS=/usr/local/libexec/x11-ssh-askpass
That's it. Hope it helps.