SSH client requires SSH_AUTH_SOCK=0 will not work without it, can't use key auth without SSH_AUTH_SOCK=0

Bug #1380084 reported by Nathaniel Homier
76
This bug affects 15 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I expect that when using key based authentication I do $ssh user@0.0.0.0 I expect to be asked for the key password. Instead I get Agent admitted failure to sign using the key.
Permission denied (publickey).

Using SSH_AUTH_SOCK=0 solves the problem allowing me to be asked for the key password.

What should happen is that I should not have to specify SSH_AUTH_SOCK=0 on the CLI, I should only have to type $ user@0.0.0.0

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openssh-client 1:6.6p1-2ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-37.64-generic 3.13.11.7
Uname: Linux 3.13.0-37-generic i686
NonfreeKernelModules: wl
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: i386
CurrentDesktop: Unity
Date: Sat Oct 11 07:19:08 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-09-08 (33 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release i386 (20140722.2)
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 ssh-askpass N/A
 libpam-ssh N/A
 keychain N/A
 ssh-askpass-gnome 1:6.6p1-2ubuntu2
SSHClientVersion: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nathaniel Homier (mechamechanism) wrote :
Revision history for this message
Nathaniel Homier (mechamechanism) wrote :
Revision history for this message
Nathaniel Homier (mechamechanism) wrote :
Revision history for this message
Nathaniel Homier (mechamechanism) wrote :

Happens with all SSH commands such as scp and sftp. This also means that I can't use the file explorer called files to connect to remote file systems. sftp will not work in the files browser because there is no way to tell files to use SSH_AUTH_SOCK=0

So I can not browse remote files in the file explorer as if they were local. I'm talking about the GUI file explorer.

Revision history for this message
Colin Watson (cjwatson) wrote :

What is the value of $SSH_AUTH_SOCK before you attempt to override it?

Revision history for this message
Nathaniel Homier (mechamechanism) wrote :

Is this what you mean?

echo "$SSH_AUTH_SOCK"
/tmp/ssh-5eicyaie79zk/agent.2453

That's as far as I got because Google would not tell me how to find the socket value that was currently in use. Please tell me the command to find the current socket value. I am eager to debug.

Revision history for this message
dualboot (guycarre) wrote :

  Hi,

 I confirm this problem with 2 other computers. It seems to be link to Unity or Gnome keyring and ssh-agent.
It does not happen with a KDE desktop. If you press ctrl+alt+F1 and test your ssh connexion, it should work due to environment variables where echo $SSL_AUTH_SOCK return an empty value.

 Into your session Unity/Gnome, you can bypass this problem by adding this line into your /home/<user>/.bashrc file :
export SSH_AUTH_SOCK=0
reload your bash environment with this command :
$ source /home/<user>/.bashrc

It works for me.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openssh (Ubuntu):
status: New → Confirmed
Revision history for this message
reetp (jcrisp) wrote :

Fix works for me too, but it obviously isn't the proper solution.

Revision history for this message
Nathaniel Homier (mechamechanism) wrote :

guycarre is right in that this is a gnome/unity problem most likely. I can confirm Ubuntu server 14.04.1 does not have this problem.

Revision history for this message
Peter Ansell (p-ansell) wrote :

The workaround to put export SSH_AUTH_SOCK=0 in my .bashrc also for me on 14.04 with the following versions:

    $ ssh -V
    OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014
    $ uname -a
    Linux mycomputer 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Rob Hills (rhills) wrote :

This bug has hit me quite hard in the last week, breaking a number of automated ssh processes that have been working without a hitch prior to sometime after Monday evening (8 December, UTC+8) this week. I can pin it down to that because each Monday and Friday evening I use a scripted ssh tunnel to connect a pgAdmin III client to a remote Postgres database. It worked last Monday, it didn't in between. Sometime after Monday this week, other ssh processes also broke.

I'm providing this info in case it helps someone pin down what changed to cause this problem. I'm surprised it's only flagged as affecting 4 people!

Revision history for this message
Rob Hills (rhills) wrote :

I forgot to mention:

uname -a
Linux robs-tosh-L50-a 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

ssh -V
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014

Revision history for this message
Rob Hills (rhills) wrote :

Also (because it is a different result from one posted earlier):

echo ${SSH_AUTH_SOCK}
/run/user/1000/keyring-X8I7Ly/ssh

Revision history for this message
reetp (jcrisp) wrote :

Although the fix above works for ssh I cannot connect with filezilla and get the following error:

Pageant failed to answer challenge

So I removed SSL_AUTH_SOCK from .bashrc and could then connect again with filezilla, but not ssh.

After a look around I can connect with ssh using the following format :

ssh -o PubkeyAuthentication=no <email address hidden>

This also works for scp. However, it is a pain in the butt.

If you use keys it circumvents the issue. However, not every machine I connect to and from has keys.

As per https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1380084/comments/12 I am surprised that this does not affect more people

Revision history for this message
Steffen Neumann (sneumann) wrote :

Affected here too after creating a new key in ~/.ssh, this is 14.04 with all updates as of today.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.