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.

Public key authorization doesn't work

See original GitHub issue

When i’m using privateKey authorization with passphrase - it works and I see something like that (your uptime example):

Connection :: connect
Connection :: ready
STDOUT:  21:26:40 up 10 days, 14:50,  1 user,  load average: 0.06, 0.03, 0.00

Stream :: EOF
Stream :: exit :: code: 0, signal: undefined
Stream :: close

But when I’m trying to use publicKey, I see something like that:

Connection :: connect
Connection :: end
Connection :: close

Is it possible to authorize using publicKey option?

Node: 0.10.16 npm: 1.3.8

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mscdexcommented, Aug 23, 2013
  • For *nix, there’s a couple different ways:

    // option 1 -- this makes the ssh-agent last until your node process exits
    # ssh-agent node foo.js
    // inside foo.js you set `agent: process.env.SSH_AUTH_SOCK` in the object passed to connect()
    
    // option 2 -- this keeps your ssh-agent around until it's killed
    # eval `ssh-agent -s`
    # node foo.js
    // inside foo.js you set `agent: '/tmp/my-ssh-agent'` in the object passed to connect()
    // below command kills the ssh-agent process and removes the unix socket
    # ssh-agent -k
    
  • For Windows, just start up pageant (from the putty set of utilities), add your key and then set agent: 'pageant' in the object passed to connect()

0reactions
mscdexcommented, Aug 24, 2013

It’s really outside the goals/scope of the project (like ~/.ssh/* file management). Feel free to re-use these functions if you want 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Troubleshoot SSH Authentication Issues
Make sure the authorized_keys file and the private key itself have the correct permissions and ownership. · Check that key-based authentication ...
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 properly set up ... The second ssh session...
Read more >
Troubleshooting SSH Key Authentication | Linode
The SSH Client Does Not Possess the Correct Private Key · Log in to the Linode using the LISH Console. · Edit the...
Read more >
SSH public key authentication doesn't work - Ask Ubuntu
Make sure you are coming from the user that has the key in the remote authorized_keys file. Share.
Read more >
SSH key authentication is not working - Red Hat Customer ...
Diagnostic Steps. Verify that the public key authentication is not working via ssh -vvv <username>@hostname and then verify the /etc/ssh/sshd_ ...
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