Reputation: 115
I need to start a SSH screen through PHP. I have a PHP script in which I am trying to create a screen on my ssh server with the PHP SSH library phpseclib. This is the function that I am using to try to create the screen:
function startscreen($ssh, $user)
{
$ssh->exec("screen -S ".$user);
}
And this is how I am calling the function:
startscreen($ssh, $user);
I know I can create screens this way, but it will not work remotely with php. Thanks
Upvotes: 0
Views: 222
Reputation: 286
Screen needs an actual pty/tty allocated to start in attached mode like you do now. It'll work better if you start it in detached mode (see the manpage, and see stack overflow if you have more programming questions)
Upvotes: 1