question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working with ssh agent unix socket

See original GitHub issue

This is on my mac and I have this as my config file

{
    "protocol": "sftp",
    "host": "full_qualified_hostname",
    "port": 22,
    "user": "vsacheti",
    "pass": "",
    "promptForPass": false,
    "remote": "/home/vsacheti/",
    "agent": "env",
    "privatekey": "",
    "passphrase": "",
    "hosthash": "",
    "ignorehost": true,
    "connTimeout": 10000,
    "keepalive": 10000,
    "keyboardInteractive": true,
    "watch": []
}

Here is some relevant info

echo $SSH_AUTH_SOCK
/private/tmp/com.apple.launchd.00vXgbWoQe/Listeners
C02PH7MSG3QD-lm:~ vsacheti$ ls -l /private/tmp/com.apple.launchd.00vXgbWoQe/Listeners
srw-rw-rw-  1 vsacheti  wheel  0 Jan 26 11:07 /private/tmp/com.apple.launchd.00vXgbWoQe/Listeners

Error Message: All configured authentication methods failed

Any ideas to make this work?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jacobtolarcommented, Feb 2, 2017

If I apply these patches to ssh2 and ssh2-streams it works.

https://github.com/jacobtolar/ssh2/compare/v0.5.4...remote-ftp-fix

https://github.com/jacobtolar/ssh2-streams/compare/v0.1.16...remote-ftp-fix

Not saying those are the right patches to make but maybe gives a clue to the problem.

My ssh server apparently gets grumpy if I send it ssh-rsa-cert-v01@openssh.com instead of ssh-rsa in the signature header. But my agent seems to be returning keys with that name.

Can’t quite grok http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?annotate=HEAD but I think it’s saying the names should be either “ssh-rsa” or “ssh-dss” or one of the ecdsa options.

ssh2-streams diff between the last working version and the current dependency: https://github.com/mscdex/ssh2-streams/compare/v0.0.23...v0.1.16

Same for ssh2: https://github.com/mscdex/ssh2/compare/v0.4.14...v0.5.4

The previous version of ssh2-streams explicitly strips the length of the cert algorithm down to 7 characters (so that answers one problem). And the previous version of ssh2 didn’t check for a whitelist of algorithms like the current one does in onUSERAUTH_PK_OK.

0reactions
iceteecommented, Sep 28, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

ssh-agent not getting set up (SSH_AUTH_SOCK ...
After running the commands, the env variables are set as expected. However, they do not stay set (e.g., in a different shell or...
Read more >
net-ssh doesn't work with ssh-agent/requires Pageant ... - GitHub
The problem is that the path /tmp/ssh-rxxpTf8axKFv/agent.1586 and esp as a unix domain socket, does not exist on windows.
Read more >
Could not open a connection to your authentication agent
First I used the ps aux | grep ssh and the kill command in Rick's answer to kill the agents. After that ssh-add...
Read more >
Why is ssh agent forwarding not working? - Server Fault
Check that you have the correct public key on pupeno/.ssh/authorized_keys on b1, and check if authorized_keys has a line break at the end...
Read more >
Using the SSH Agent - STAR
The ssh-agent creates a unix domain socket, and then listens for connections from /usr/bin/ssh on this socket. It relies on simple unix permissions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found