www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Issue connecting to Netscreen/Juniper devices

Issue connecting to Netscreen/Juniper devices

From: Benjamin Krajmalnik <bkrajmalnik_at_gmail.com>
Date: Tue, 29 May 2012 15:45:39 -0600

I have written a wrapper for LibSSH2 for Clarion, and while I have
been successful accessing Unix devices without any issue, I am having
issues accessing Juniper/Netscreen devices.
I am using LibSSH@ ver. 1.2.7 (windows binaries).
The steps I am following are:

1. Create a socket - no errors
2. Connect to the socket - no errors
3. Call libssh2_init (Flags set to 0) - no errors
4. Call libssh2_session_init_ex(0, 0, 0, 0) - no errors
5. Call libssh2_session_startup(session, socket) - no errors
I proceed through the authentication process without any errors.

Once I have authenticated, I attempt to open a channel shell as follows:
Session type is set to 'session',

    SELF.ChannelShell = PARENT.channel_open_ex(SELF.Session,
ADDRESS(SessionType), LEN(SessionType),

     IF SELF.ChannelShell = 0
        FunctionName = ' - (channel_open_ex)'

     IF PARENT.channel_request_pty_ex(SELF.ChannelShell,
ADDRESS(STerm), LEN(STerm), 0, 0, TermWidth, TermHeight,
        FunctionName = ' - (channel_request_pty_ex)'

This is where it is failing (attempting to obtain the pty. The error
code which we are getting is -22 -

Any ideas how to overcome this issue?
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-05-29

the libssh2 team