pty.js icon indicating copy to clipboard operation
pty.js copied to clipboard

How to open terminal using ssh key ?

Open nitishrai opened this issue 9 years ago • 3 comments

Hi i have a ssh key content to a varialbe how can i use it to spawn ssh session ?

nitishrai avatar Jul 09 '16 05:07 nitishrai

Good question, ...

I think the only way for now is to save it in a file, and use then with the -i option. ...

If someone has a better idead I'm open for it! ...

LaKing avatar Jul 10 '16 23:07 LaKing

Is there a way that u can spawn the ssh using a object array ? i do it like this on another ssh modules ..

nitishrai avatar Jul 11 '16 03:07 nitishrai

var term = pty.spawn('ssh', ["-i", key.pem, user@host], { name: 'xterm-color', cols: cols || 80, rows: rows || 24, cwd: process.env.PWD, env: process.env });

akash9236 avatar Aug 16 '16 03:08 akash9236