1

I am trying to use libssh to execute show_remote_files(session) on remote host. But it gets stuck and gives the following output.

I used get_ssh_version and it shows 2.

Can I not use ssh2 with libshh? How can I tell my system(linux) to use ssh1 instead?

[2014/09/28 11:21:02.134908, 1] ssh_connect: libssh 0.6.1 (c) 2003-2014 Aris Adamantiadis, Andreas Schneider, and libssh contributors. Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_noop

[2014/09/28 11:21:02.170424, 2] ssh_socket_connect: Nonblocking connection socket: 3

[2014/09/28 11:21:02.170466, 2] ssh_connect: Socket connecting, now waiting for the callbacks to work

[2014/09/28 11:21:02.294109, 1] socket_callback_connected: Socket connection callback: 1 (0)

[2014/09/28 11:21:02.330777, 1] ssh_client_connection_callback: SSH server banner: SSH-1.99-OpenSSH_5.3

[2014/09/28 11:21:02.330815, 1] ssh_analyze_banner: Analyzing banner: SSH-1.99-OpenSSH_5.3

[2014/09/28 11:21:02.330827, 1] ssh_analyze_banner: We are talking to an OpenSSH client version: 5.3 (50300)

[2014/09/28 11:21:02.492126, 2] ssh_packet_dh_reply: Received SSH_KEXDH_REPLY

[2014/09/28 11:21:02.493287, 2] ssh_client_dh_reply: SSH_MSG_NEWKEYS sent

[2014/09/28 11:21:02.493324, 2] ssh_packet_newkeys: Received SSH_MSG_NEWKEYS

[2014/09/28 11:21:02.493604, 2] ssh_packet_newkeys: Signature verified and valid ssh_get_version = 2 before after

[2014/09/28 11:21:02.495199, 2] channel_open: Creating a channel 43 with 64000 window and 32768 max packet

[2014/09/28 11:21:02.602802, 1] ssh_packet_unimplemented: Received SSH_MSG_UNIMPLEMENTED (sequence number 3)

int rc = ssh_channel_open_session(channel);

This line blocks the code when session is in blocking mode.

G Gill
  • 1,087
  • 1
  • 12
  • 24

0 Answers0