javascript - How to set up SSH Agent Forwarding in node.js (simple-ssh module)? -


i new node.js , using module simple-ssh executing shell commands windows remote server.
whenever run code, console curses me [error: authentication failure. available authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive].
have put rsa private-key file, , set windows env variable ssh_auth_sock. still keeps giving error.
below code snippet wrote simple-ssh:

var ssh = new ssh({                     host: sshhost,                     user: 'root',                     timeout: 11000000,                     key: require('fs').readfilesync("d:/keys_pair_prvt_pub/rsa_key"),                     agent: process.env.ssh_auth_sock,                     agentforward: true                 }); 

when trying ssh remote windows cmd-prompt, giving me error:

$> ssh -a <myremote.host.com> ssh : term 'ssh' not recognized name of cmdlet, function, script file, or operable program. check spelling of name, or if path included, verify path correct , try again. 

am missing anything? if yes, how overcome ?
appreciated :)
thanks.

your key needs added ~/.ssh/authorized_keys on server key work.

mscdex npm package ssh2, simple-ssh wraps, has in docs using ssh.agent on windows:

`agent - string - path ssh-agent's unix socket ssh-agent-based user authentication. windows users: set 'pageant' authenticating pageant or (actual) path cygwin "unix socket."


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -