doushi1473
2013-01-17 05:09
浏览 652
已采纳

PHP + SSH如何修复:“错误:ssh2_connect():启动SSH连接时出错(-4):收到无效的MAC?”

Working on a project that was built using ssh2_connect to download files from a server. The production server the project is running on works, but getting ssh2_connect to work on my Mac running OSX 10.8 is proving to be problematic.

The following command:

ssh2_connect("myhost", 22);

Produces the following error:

Error: ssh2_connect(): Error starting up SSH connection(-4): Invalid MAC received

I can connect from the command line, so I know it isn't a system wide SSH issue. Does anyone know how to debug or solve this problem? Thanks in advance and may your children be blessed with large brains and social skills :)

UPDATE: Solution posted below

图片转代码服务由CSDN问答提供 功能建议

处理使用ssh2_connect构建的项目,以从服务器下载文件。 该项目正在运行的生产服务器正常运行,但让我的Mac上运行OSX 10.8的ssh2_connect工作证明是有问题的。</ p>

以下命令:</ p>

  ssh2_connect(“myhost”,22); 
 </ code> </ pre> 
 
 

产生以下错误:</ p>

 错误:ssh2_connect():启动SSH连接时出错(-4):接收到无效的MAC 
 </ code> </ pre> 
 
 

我可以从命令行连接,所以我知道它不是 系统范围的SSH问题。 有谁知道如何调试或解决这个问题? 在此先感谢您,您的孩子可能拥有大脑和社交技巧:)</ p>

更新:解决方案发布在下面</ p> </ div>

2条回答 默认 最新

相关推荐 更多相似问题