简体   繁体   中英

Can't start screen on a remote server by ssh

I'm trying to start a screen on my remote server using simple-ssh package in my meteor project.

My code:

var SSH = require('simple-ssh');

var ssh = new SSH({
host: 'somehost',
user: 'username',
pass: 'password'
});

ssh.exec('screen rtsp2feed 3 3 rtsp://server:port > log.txt', {
out: function(stdout) {
    console.log(stdout);
}
}).start();

But screen didn't start. Log file says "Must be connected to a terminal".

How can I fix this?

我错过了simple-ssh的“ pty”选项,该选项会创建伪终端

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM