I always used ssh-agent to remember keys ... / 2008-05-27

2008-05-27 I always used ssh-agent to remember keys ... 9 years ago
I always used ssh-agent to remember keys for me, but lately I started adding a timeout to keys so they don't get remembered indefinitely. Especially on my laptop: what if it gets stolen, the keys are still valid when it comes out of suspend mode. So now I type ssh-add -t 3600 so they are only valid for one hour. But, that is still not ideal as I need to remember that keys might be forgotten when I click on a button or menuitem in fvwm to start a new xterm-with-ssh. Otherwise I may be thrown out directly from the session or asked for a password or passphrase, depending on the SSH security settings. So, fvwm functions to the rescue:
AddToFunc SSHUR4 "I" Exec if ! ssh-add -l > /dev/null; then ssh-add -t 600 .ssh/id_dsa <&- 2>/dev/null ; fi; uxterm -fg black -bg '#e0e0e0' -geom 80x40 -title 'slogin $0' -vb -e ssh -e none $0 &
Now I can just use SSHR4 host.name and it will ask for the ssh passphrase when needed. In an fvwm menu item: AddToMenu Remote-Logins "idefix.net%mini-freebsd.xpm%" SSHR4 idefix.net and in an fvwm button: *FvwmButtons(Title idefix, Icon mini-freebsd.xpm, Action 'SSHUR4 idefix.net' )

Tags: , , ,

, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
RSS
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews, Weather maps
This page generated in 0.009052 seconds.