You are not logged in.
I recently got a new laptop and installed Arch in a dual-boot environment. I've basically got everything configured the way I want it now, except that I can't get ksshaskpass to work the way I want it. On my old laptop, it's set up to ask for the password for my SSH key at login, with a few lines of code in .bash_profile. On my new laptop, it doesn't ask for my password at login, so I have to enter it each time I do something requiring my SSH key. Looking at the .bash_profile code, the only thing I can think of is that something else is launching ssh-agent before that script is run.
This is the script in question.
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
export SSH_ASK_PASS="/usr/bin/ksshaskpass"
ssh-add
fi
Any ideas on where to look?
Offline
Is your .bash_profile sourced at all? How are you starting your session? What are you starting? Some information about your setup other than a random shell snippet would be useful. See:
How To Ask Questions The Smart Way,
Offline
I'm using KDE so the session starts when I login. I have no idea if .bash_profile is being sourced at all, but ps aux does show that ssh-agent is running.
Offline
It appears it is getting read...
[michael@michaelarch SMF21]$ printenv | grep SSH
SSH_AUTH_SOCK=/tmp/ssh-KvoE09Mwzz8i/agent.790
SSH_ASK_PASS=/usr/bin/ksshaskpass
SSH_AGENT_PID=791
Offline
On my arch install I have to use `SSH_ASKPASS` without underscore.
The ships hung in the sky in much the same way that bricks don't. - Douglas Adams
Offline
In my environment I had to specify the variable SSH_ASKPASS_REQUIRE in this way:
export SSH_ASKPASS="/usr/bin/ksshaskpass"
export SSH_ASKPASS_REQUIRE=prefer
In ssh-add manual is reported:
SSH_ASKPASS_REQUIRE allows further control over the use of an askpass program. If this variable is set to “never” then ssh-add will never attempt to use one. If it is set to
“prefer”, then ssh-add will prefer to use the askpass program instead of the TTY when requesting passwords. Finally, if the variable is set to “force”, then the askpass pro‐
gram will be used for all passphrase input regardless of whether DISPLAY is set.
Offline
I just cam here to say thank you!
export SSH_ASKPASS_REQUIRE=prefer
Did the trick.
Offline