You are not logged in.

#1 2020-04-28 05:41:31

Oldiesmann
Member
Registered: 2020-04-20
Posts: 13

ksshaskpass integration not working

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

#2 2020-04-28 05:47:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: ksshaskpass integration not working

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,


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-04-28 15:16:53

Oldiesmann
Member
Registered: 2020-04-20
Posts: 13

Re: ksshaskpass integration not working

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

#4 2020-04-28 17:19:58

Oldiesmann
Member
Registered: 2020-04-20
Posts: 13

Re: ksshaskpass integration not working

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

#5 2022-01-18 18:56:57

arkades
Member
Registered: 2019-02-23
Posts: 6

Re: ksshaskpass integration not working

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

#6 2022-05-05 10:52:09

gpantanetti
Member
Registered: 2022-05-05
Posts: 1

Re: ksshaskpass integration not working

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

#7 2022-05-19 13:01:50

tah
Member
Registered: 2008-07-13
Posts: 2

Re: ksshaskpass integration not working

I just cam here to say thank you!

export SSH_ASKPASS_REQUIRE=prefer

Did the trick.

Offline

Board footer

Powered by FluxBB