Hello. There is a PHP script that executes the screen -S test337
via SSH, here it is:
/* Соединение */ $connect = ssh2_connect($rows1['ip'], $rows1['sshport']); ssh2_auth_password($connect, $rows1['login'], base64_decode($rows1['password'])); $shell = ssh2_shell($connect); /* Выполнение команды */ fwrite($shell, 'screen -S test337'.PHP_EOL); /* Получение ответа */ $text = ''; while($buf = fread($shell,4096)) {$text .= $buf;}; echo '<br>'.$text; /* Закрытие соединения */ fclose($shell);
The $rows1
stores data from SSH.
But the server gives an error:
Cannot find terminfo entry for 'vanilla'
Even if you just send a screen
command, it will return the exact same error.
The server costs CentOS 6. *
Can you please tell me how to fix this?
And why can it even happen?