Chris Green
2024-Jan-02 09:51 UTC
How to get "Enter passphrase" on command line rather than GUI pop-up?
> > There must be *something* in the environment that affects this because > I'm seeing two different ways of asking for the passphrase on the same > screen. The only difference is that one is a simple terminal window > running on my system and the other is one where I have used ssh to > connect to a remote system and then ssh again back to the 'home' > system. The local system window gets the GUI pop-up the 'two ssh' > window asks for the passphrase in the terminal. >I think I have it! I need to unset SSH_AUTH_SOCK, that's all that's needed. See:- chris$ ssh -i backup_id_rsa backup [here the pop-up appears and I cancel it] sign_and_send_pubkey: signing failed for RSA "backup_id_rsa" from agent: agent refused operation chris at backup's password: chris$ env | grep SSH SSH_AUTH_SOCK=/run/user/1000/keyring/ssh SSH_ASKPASS_REQUIRE=never chris$ unset SSH_AUTH_SOCK chris$ ssh -i backup_id_rsa backup Enter passphrase for key 'backup_id_rsa': chris at backup$ So the SSH_ASKPASS etc. are irrelevant for my set-up. I thought I'd tried unsetting SSH_AUTH_SOCK before but obviously I hadn't, I guess the need to specify the key file is a result of not having that but it's not a problem for me really. -- Chris Green
Stuart Henderson
2024-Jan-03 10:04 UTC
How to get "Enter passphrase" on command line rather than GUI pop-up?
On 2024/01/02 09:51, Chris Green wrote:> I think I have it! I need to unset SSH_AUTH_SOCK, that's all that's > needed. See:- > > chris$ ssh -i backup_id_rsa backup > [here the pop-up appears and I cancel it] > sign_and_send_pubkey: signing failed for RSA "backup_id_rsa" from > agent: agent refused operation > chris at backup's password: > > chris$ env | grep SSH > SSH_AUTH_SOCK=/run/user/1000/keyring/ssh > SSH_ASKPASS_REQUIRE=never > chris$ unset SSH_AUTH_SOCK > chris$ ssh -i backup_id_rsa backup > Enter passphrase for key 'backup_id_rsa': > chris at backup$ > > So the SSH_ASKPASS etc. are irrelevant for my set-up. I thought I'd > tried unsetting SSH_AUTH_SOCK before but obviously I hadn't, I guess > the need to specify the key file is a result of not having that but > it's not a problem for me really.You might like to try something like this in .ssh/config Host backup IdentityAgent none IdentityFile ~/backup_id_rsa
Maybe Matching Threads
- How to get "Enter passphrase" on command line rather than GUI pop-up?
- How to get "Enter passphrase" on command line rather than GUI pop-up?
- How to get "Enter passphrase" on command line rather than GUI pop-up?
- How to get "Enter passphrase" on command line rather than GUI pop-up?
- How to get "Enter passphrase" on command line rather than GUI pop-up?