大家好,我正在尝试在windows应用程序(我编写的一个程序)和ssh服务器之间建立一个简单的ssh连接。在我的代码中,我使用了libssh,并且出现了类似这样的错误: crypt_set_algorithms2:没有为3des-cbc找到加密算法函数
我使用的代码是:
#include <libssh/libssh.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
ssh_session my_ssh_session;
int rc;
int port = 22;
我有两个有专用局域网IP的数字海洋实例,第一个是10.130.30.82,第二个是10.130.35.154。我可以从第一页第二页,但不是SSH。我使用ssh-copy-id将我的密钥复制到两个服务器,并且没有在第二台服务器上更改sshd_config。我的本地机器和两台服务器都是ubuntu,
SSH从第一个输入到第二个就会出现以下错误:
/etc/ssh/ssh_config: line 11: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 12: Bad configuration option: hostkey
我正在尝试制作一个c++程序,它将连接到ssh服务器(我的笔记本电脑)。服务器没问题,因为我可以通过putty连接。虽然我写的程序到目前为止还不能。在我的代码中,我使用的是libssh.h库,在开发中我使用了visual studio 2015。我得到的错误是:crypt_set_algorithms2:没有为3des-cbc找到密码算法函数,到目前为止我还没有找到任何东西,所以我希望能对您有所帮助。我使用的代码:
#include <libssh/libssh.h>
#include <stdlib.h>
#include <stdio.h>
int m
我使用libssh来实现两个系统之间的连接,ssh服务器是redhat,客户端是CentOS。
我的代码编译和链接都很好,除了在运行时我一直看到这样的情况,
[1] libssh 0.5.5 (c) 2003-2010 Aris Adamantiadis (aris@0xbadc0de.be) Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_noop
[2] Nonblocking connection sock
Case 1: SSH主机有一个网络接口
📷
主机SSH的路由表:
[SSH] $ ip route
default via 192.168.211.1 dev eth0
192.168.211.0/24 dev eth0 proto kernel scope link src 192.168.211.119
从SSH_Client启动ssh连接到LAN_0上的主机SSH可以流畅地工作:
[SSH_CLIENT] $ ssh user@192.168.211.119 -p 22
Case 2: SSH主机有两个网络接口
📷
主机SSH的路由表:
[SSH] $ ip route
default
我正在尝试在我笔记本的Windows10上的SSH客户端和安装在VMWare上的Ubuntu之间建立一个简单的ssh连接。我使用libssh支持ssh,使用Qt Creator作为IDE。下面是这段代码: int verbosity = SSH_LOG_PROTOCOL;
int port = 22;
ssh_session ssh = ssh_new();
if (ssh == nullptr)
{
QMessageBox::critical(this, "Error", "Something went wrong with allocation!"