使用libssh2连接到某些服务器时出现问题 [英] Problem connecting to some servers using libssh2

查看:1349
本文介绍了使用libssh2连接到某些服务器时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Libssh2 - 1.7.0和/或OpenSSL 1.1.0中遇到了问题。



使用编译的API通过SSH连接到旧的Linux盒子时一切都如预期的那样。



当尝试连接到更新的发行版时,连接失败并显示错误:建立SSH会话失败:-8。



我读到这个错误与Linux机器上的curl / libcurl版本有关,但我无法升级或下载它们的curl版本。



AIX最新版本引发同样的问题。



任何帮助?

提前致谢,

鲍里斯。



我尝试过:



尝试连接到更新的发行版时,连接失败并显示错误:建立SSH会话失败:-8。

I have an issue in Libssh2 - 1.7.0 and/or OpenSSL 1.1.0.

When connecting through SSH using the compiled API to an old Linux box, everything is as expected.

When trying to connect to a more recent distribution, the connection fails with error: Failure establishing SSH session: -8.

I read that this error is related to the curl/libcurl version on the Linux machines, but I can't upgrade or download the curl version on them.

The same problem is raised with AIX recent versions.

Any help?
Thanks in advance,
Boris.

What I have tried:

When trying to connect to a more recent distribution, the connection fails with error: Failure establishing SSH session: -8.

推荐答案

最近的Linux发行版配置默认情况下,SSH服务器更具限制性。


您可以更改服务器SSH配置(不推荐)或应用程序使用的身份验证方法(推荐)。



避免此类问题最好的解决方案是使用公钥认证。



在OpenSSH 6.7的默认配置中也禁用了许多版本2密码(参见 Openssh 6.7禁用了许多密码/网络,服务器和保护/ Arch Linux论坛 [ ^ ])。



还有更多可能的原因,比如防火墙。要知道出了什么问题,您应该尝试使用最新的身份验证方法从不同的系统进行连接,以确保您可以连接到服务器并检查连接失败的服务器的日志文件。
Recent Linux distributions configure SSH servers to be more restrictive by default.

You might change the server SSH configuration (not recommended) or the authentication method used by your application (recommended).

To avoid such troubles the best solution is to use public-key authentication.

There has been also a number of version 2 ciphers disabled in the default config with OpenSSH 6.7 (see Openssh 6.7 disables a number of ciphers / Networking, Server, and Protection / Arch Linux Forums[^]).

There are even more possible reasons like firewalls. To know what is going wrong you should try to connect from a different system using an up-to-date authentication method to ensure that you can connect to the servers and inspect the log files of the servers where the connection fails.


这篇关于使用libssh2连接到某些服务器时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆