duangou2046 2016-08-11 08:46
浏览 31

执行连续登录时,NET_SFTP无法正常工作

the second call doesn't work:

$sftp = new Net_SFTP('domain1', 22);

var_dump($sftp->login('username1', 'password1'));

unset ($sftp);

$sftp2 = new Net_SFTP('domain2', 22);

var_dump($sftp2->login('username2', 'password2'));

when i do the second call without the first one, it works perfectly.

this is the error the second call produce:

Notice: Invalid HMAC in C:\WT-NMP\WWW\lib\phpseclib\Net\SSH2.php on line 3048
...
Notice: Connection closed by server in C:\WT-NMP\WWW\lib\phpseclib\Net\SSH2.php on line 2015
  • 写回答

1条回答 默认 最新

  • dongzhang3482 2016-08-11 10:55
    关注

    The library in the question https://github.com/phpseclib/phpseclib/tree/1.0

    I could not reproduce the error with v1.0.x-dev "e6a2ce1". It outputs

    bool(true)
    bool(true)
    

    PHP 5.5.37

    Please confirm your domains are accessible, passwords are correct, the output remains the same when you change order of domains. Update the question with exact version of the library and php.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?