Subject: Re: RouterOS Handshake problem

Re: RouterOS Handshake problem

From: Antonio Modesto <>
Date: Tue, 12 Mar 2013 11:01:10 -0300


On 2013-03-12 8:36 am, Antonio Modesto wrote:

> Hello,
> I
work at an ISP and I'm writing a C program to create and fetch backup
files from routers running RouterOS, the problem is that there is a
compatibility problem between routeros's ssh implementation e and
libssh2 (The problem is with routeros, I think). Here is the error:

> ssh_privatekey_connect() - Host: - SSH handshake error

> ssh_privatekey_connect() - Error code: -8, Error: Unable to
exchange encryption keys
> While googling I found that changing the
encryption to diffie-hellman-group1-sha1 would work, but I didn't find
the way to force libssh2 to use this kind of encryption.
> Any
> Thanks.
> libssh2-devel
> [1]


I called libssh2_session_method_pref to force libssh2 to use
diffie-hellman-group1-sha1 encryption keys. The problem now is with SCP,
when I call libssh2_scp_recv() I get two random error codes, which are
-28 and -43. I am attaching the tracing from the beginning of the




Received on 2013-03-12