I have been using shelljs to execute certain set of commands. So i tried to connect to a remote ubuntu server over ssh via shelljs. This is my nodejs file.
var shelljs = require('shelljs');
shelljs.exec('ssh -i [path/to/pem/file] ubuntu@[taregt_ip]');
But i get this error:
Pseudo-terminal will not be allocated because stdin is not a terminal.
So how to solve this issue or is there any other utility to connect to ssh with one single command.
EDIT: the link you guys are posting for me to refer in not the duplicate of my problem.