Exemplo n.º 1
0
 public static extern int libssh2_userauth_publickey(
     SshSessionHandle session,
     [MarshalAs(UnmanagedType.LPStr)] string username,
     [MarshalAs(UnmanagedType.LPArray)] byte[] publicKey,
     IntPtr pemPublicKeyLength,
     SignCallback callback,
     IntPtr context);
Exemplo n.º 2
0
 public static extern SshChannelHandle libssh2_channel_open_ex(
     SshSessionHandle session,
     [MarshalAs(UnmanagedType.LPStr)] string channelType,
     uint channelTypeLength,
     uint windowSize,
     uint packetSize,
     [MarshalAs(UnmanagedType.LPStr)] string message,
     uint messageLength);
Exemplo n.º 3
0
        public SshSession()
        {
            this.sessionHandle = UnsafeNativeMethods.libssh2_session_init_ex(
                Alloc,
                Free,
                Realloc,
                IntPtr.Zero);

            // Use blocking I/O by default.
            this.IsBlocking = true;
        }
Exemplo n.º 4
0
 public static extern void libssh2_session_set_timeout(
     SshSessionHandle session,
     int timeout);
Exemplo n.º 5
0
 public static extern int libssh2_session_get_timeout(
     SshSessionHandle session);
Exemplo n.º 6
0
 public static extern void libssh2_trace(
     SshSessionHandle session,
     LIBSSH2_TRACE bitmask);
Exemplo n.º 7
0
 public static extern int libssh2_session_last_errno(
     SshSessionHandle session);
Exemplo n.º 8
0
 public static extern void libssh2_keepalive_config(
     SshSessionHandle session,
     int wantReply,
     uint interval);
Exemplo n.º 9
0
 public static extern Int32 libssh2_session_method_pref(
     SshSessionHandle session,
     LIBSSH2_METHOD methodType,
     [MarshalAs(UnmanagedType.LPStr)] string prefs);
Exemplo n.º 10
0
 public static extern Int32 libssh2_session_supported_algs(
     SshSessionHandle session,
     LIBSSH2_METHOD methodType,
     [Out] out IntPtr algorithmsPtrPtr);
Exemplo n.º 11
0
 public static extern IntPtr libssh2_session_methods(
     SshSessionHandle session,
     LIBSSH2_METHOD methodType);
Exemplo n.º 12
0
 public static extern void libssh2_session_set_blocking(
     SshSessionHandle session,
     Int32 blocking);
Exemplo n.º 13
0
 public static extern Int32 libssh2_session_get_blocking(
     SshSessionHandle session);
Exemplo n.º 14
0
 public static extern Int32 libssh2_session_disconnect_ex(
     SshSessionHandle session,
     SSH_DISCONNECT reason,
     [MarshalAs(UnmanagedType.LPStr)] string description,
     [MarshalAs(UnmanagedType.LPStr)] string lang);
Exemplo n.º 15
0
 public static extern Int32 libssh2_free(
     SshSessionHandle session,
     IntPtr ptr);
Exemplo n.º 16
0
 public static extern Int32 libssh2_userauth_authenticated(
     SshSessionHandle session);
Exemplo n.º 17
0
 public static extern IntPtr libssh2_userauth_list(
     SshSessionHandle session,
     [MarshalAs(UnmanagedType.LPStr)] string username,
     int usernameLength);
Exemplo n.º 18
0
 public static extern IntPtr libssh2_session_banner_get(
     SshSessionHandle session);
Exemplo n.º 19
0
 public static extern Int32 libssh2_session_banner_set(
     SshSessionHandle session,
     [MarshalAs(UnmanagedType.LPStr)] string banner);
Exemplo n.º 20
0
 public static extern Int32 libssh2_session_handshake(
     SshSessionHandle session,
     IntPtr socket);
Exemplo n.º 21
0
 public static extern int libssh2_keepalive_send(
     SshSessionHandle session,
     out int secondsToNext);
Exemplo n.º 22
0
 public static extern IntPtr libssh2_session_hostkey(
     SshSessionHandle session,
     out IntPtr length,
     out LIBSSH2_HOSTKEY_TYPE type);
Exemplo n.º 23
0
 public static extern int libssh2_session_last_error(
     SshSessionHandle session,
     out IntPtr errorMessage,
     out int errorMessageLength,
     int allocateBuffer);
Exemplo n.º 24
0
 public static extern IntPtr libssh2_hostkey_hash(
     SshSessionHandle session,
     LIBSSH2_HOSTKEY_HASH hashType);
Exemplo n.º 25
0
 public static extern void libssh2_trace_sethandler(
     SshSessionHandle session,
     IntPtr context,
     TraceHandler callback);
 public static extern int libssh2_userauth_keyboard_interactive_ex(
     SshSessionHandle session,
     [MarshalAs(UnmanagedType.LPStr)] string username,
     int usernameLength,
     KeyboardInteractiveCallback callback,
     IntPtr context);