Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to open terminal using ssh key ? #170

Open
nitishrai opened this issue Jul 9, 2016 · 3 comments
Open

How to open terminal using ssh key ? #170

nitishrai opened this issue Jul 9, 2016 · 3 comments

Comments

@nitishrai
Copy link

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

@LaKing
Copy link

LaKing commented Jul 10, 2016

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! ...

@nitishrai
Copy link
Author

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

@akash9236
Copy link

akash9236 commented Aug 16, 2016

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
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants