Skip to content

SSH.Channel.Open

Andrew Lambert edited this page Apr 20, 2026 · 6 revisions

SSH.Channel.Open

Method Signature

 Shared Function Open(Session As SSH.Session, Type As String, WindowSize As UInt32, PacketSize As UInt32, Message As String) As SSH.Channel

Parameters

Name Type Comment
Session Session An active SSH session to use.
Type String The request type (case-sensitive).
WindowSize UInt32 The maximum amount of unacknowledged data remote host is allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet.
PacketSize UInt32 The maximum number of bytes remote host is allowed to send in a single packet.
Message String Additional data as required by the selected channel Type.

Return value

Returns an instance of Channel, or Nil on error. Check Session.GetLastError (not Session.LastError) for error details.

Remarks

Creates a new channel over the session using the specified options. Use this method if you need to control the packet and window sizes. In most cases, you can use SSH.OpenChannel instead of this method to use the defaults.

Example

 Dim session As SSH.Session = SSH.Connect("ssh.example.com", 22, "username", "password")
 Dim channel As SSH.Channel = SSH.Channel.Open(session, "session", 262144, 16384, "")

Clone this wiki locally