[英]phpseclib Unable to request pseudo-terminal (SFTP)
include('Net/SFTP.php');
$sftp = new Net_SFTP($ftp_server,225);
if(!$sftp->login($ftp_user, $ftp_pass)){
print_r($sftp->getErrors());
exit('Login Failed');
}
I always get: 我总是得到:
Notice: Unable to request pseudo-terminal in /www/asizi/lib/phpseclib/Net/SSH2.php on line 2239
Notice: Connection closed prematurely in /www/asizi/lib/phpseclib/Net/SSH2.php on line 2347
Array ( )
Login Failed
My login is correct, if I make it incorrect I get just: "Login Failed" with not errors/warnings 我的登录名是正确的,如果输入不正确,我将得到:“登录失败”,没有错误/警告
phpseclib version: 0.3.1 phpseclib版本:0.3.1
I can't pass $sftp->login();
我不能通过
$sftp->login();
Where do I go wrong? 我哪里出错了?
What do the SSH logs say? SSH日志怎么说? Here's an example of how to get them:
这是如何获取它们的示例:
http://phpseclib.sourceforge.net/ssh/examples.html#logging http://phpseclib.sourceforge.net/ssh/examples.html#logging
Note the define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX);
注意
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX);
and the echo $ssh->getLog();
和
echo $ssh->getLog();
lines. 线。
Thanks! 谢谢!
For me, this error occurred because I was calling exec
in-between of a read
and write
session. 对我来说,因为我是叫这个错误发生
exec
一间中, read
和write
会话。
You can not call exec when emulating an interactive terminal session. 模拟交互式终端会话时,无法调用exec。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.