0

I'm trying to ssh-agent on Windows Subsystem for Linux (Ubuntu 18.04) so that I don't have to type in the passphrase for the private key, not even once per session.

I followed this answer and set up my .bashrc as follows:

ssh-add -l &>/dev/null
if [ "$?" == 2 ]; then
  test -r ~/.gnome-keyring && \
    source ~/.gnome-keyring && \
    export DBUS_SESSION_BUS_ADDRESS GNOME_KEYRING_CONTROL SSH_AUTH_SOCK GPG_AGENT_INFO GNOME_KEYRING_PID

  ssh-add -l &>/dev/null
  if [ "$?" == 2 ]; then
    (umask 066; echo `dbus-launch --sh-syntax` > ~/.gnome-keyring; gnome-keyring-daemon >> ~/.gnome-keyring)
    source ~/.gnome-keyring && \
    export DBUS_SESSION_BUS_ADDRESS GNOME_KEYRING_CONTROL SSH_AUTH_SOCK GPG_AGENT_INFO GNOME_KEYRING_PID
  fi
fi

Now gnome-keyring-daemon tries to work (as it doesn't ask the passphrase anymore), but what I get instead is:

sign_and_send_pubkey: signing failed: agent refused operation

There are some answers on askubuntu on this issue already, but none of the solutions worked for me. How do I have more sense of what's really happening?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.