Monday November 08, 2004 The ssh(1), and ssh-add(1) commands allow using an external program to do the prompting of passwords, or passphrases for encrypted private keys. The main use of this is to provide a graphical prompt when running under the X window system. The zenity(1) command is part of the latest JDS3 release on Solaris, it provides a simple way of creating common dialog boxes from inside shell scripts.The following very simple script can be uses as the SSH_ASKPASS program. Place this script in a directory in your path, lets say ~/bin, and set $SSH_ASKPASS to point to it.
#!/bin/sh prompt=$(echo $1 | sed s/_/__/g) ICON=/usr/share/pixmaps/blueprint-keyring.png zenity --entry --title "ssh(1) Authentication" --text="$prompt" --hide-text --window-icon=$ICON
I have also created a gnome-panel launcher for this so that I can add ssh private keys to my ssh-agent process just by clicking on the panel. Right click on the gnome panel: Add to Panel -> Launcher. For the command use "/usr/bin/ssh-add" (no quotes). Pick an icon (I use blueprint-keyring.png) and give it a name (this will be used in the tool tip , I use ssh-add). If you are using gdm to login to Solaris the ssh-agent will have been started for your. If you are using dtlogin then see the instructions on docs.sun.com.
( Nov 08 2004, 03:44:37 PM GMT ) Permalink