Question: Auth with SSH Agent
See original GitHub issueCan you provide an example of authentication with an SSH agent?
I’m having trouble getting it working, persistently getting:
Connection :: connect
Connection :: error :: Error: Authentication failure. Available authentication methods: undefined
Connection :: close
I’m providing the path to the SSH Agent socket, and other details:
c.connect({
host: 'some-server.com',
port: 22,
username: 'me',
agent: "/path/to/agent/socket",
});
Platform is OSX (perhaps this isn’t supported?) node.js 0.8.18
Any suggestions/help would be appreciated!
Issue Analytics
- State:
- Created 10 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
The pitfalls of using ssh-agent, or how to use an agent safely
Too many keys, github, and friends One thing to keep in mind is that when you try to login into a remote host,...
Read more >Why am I still getting a password prompt with ssh with public ...
When I first set up my ssh key auth, I didn't have the ~/.ssh folder ... Our problem was that login worked from...
Read more >Could not open a connection to your authentication agent
See the following answers: ssh-add complains: Could not open a connection to your authentication agent.
Read more >Some questions regarding SSH key authentication - Super User
As the title says, I have some questions regarding SSH key authentication method on a Linux machine. First of all, I generated my...
Read more >Connect to your Git repos with SSH - Azure - Microsoft Learn
How SSH key authentication works; Set up SSH key authentication; Questions and troubleshooting. Azure DevOps Services | Azure DevOps Server ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
mscdex, kuleszaj, thanks!
I wanted to use agent forwarding but every time got error: { [Error: Authentication failure. Available authentication methods: publickey,password] level: ‘authentication’, partial: false }
This work for me:
I found the problem.
I was not properly initializing the SSH agent from within tmux. I forgot that tmux is detached from the normal user-space, and so some access (e.g. SSH agent) needs to be re-initialized from within tmux.
Thank you very much for your suggestions – they led me to digging into what ultimately ended up being the answer.