Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Client.SSH
- Methods
- Properties
- AllocatePty
- Authentication
- Blocking
- Columns
- Command
- Compression
- DataOut
- DataReady
- Encryption
- EncryptionList
- ExitSignal
- ExitStatus
- FingerPrintType
- FIPS
- ForwardHost
- ForwardPort
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeyFowarding
- Login
- Password
- Port
- PrivateKey
- Prompt
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- Rows
- ShowStdErrorMessages
- State
- StripANSI
- Subsystem
- TerminalType
- Timeout
- Version
- Events
- How to get support?
Connect method
Connects to the server.
Type
VoidSyntax
- C#
- VB.NET
public Void Connect();
public Void Connect(String Hostname);
The Connect(Hostname) syntax has these parts:
public Void Connect(String Hostname, Int16 Port);
The Connect(Hostname,Port) syntax has these parts:
public Void Connect(String Hostname);
The Connect(Hostname) syntax has these parts:
Hostname | Hostname of the server. |
public Void Connect(String Hostname, Int16 Port);
The Connect(Hostname,Port) syntax has these parts:
Hostname | Hostname of the server. |
Port | Port on the server where we will connect. |
public Sub Connect()
public Sub Connect(ByVal Hostname As String)
The Connect(Hostname) syntax has these parts:
public Sub Connect(ByVal Hostname As String, ByVal Port As Int16)
The Connect(Hostname,Port) syntax has these parts:
public Sub Connect(ByVal Hostname As String)
The Connect(Hostname) syntax has these parts:
Hostname | Hostname of the server. |
public Sub Connect(ByVal Hostname As String, ByVal Port As Int16)
The Connect(Hostname,Port) syntax has these parts:
Hostname | Hostname of the server. |
Port | Port on the server where we will connect. |
Remarks
Connect method will initiate connection between wodSSH.NET and the remote server. It can be used only if wodSSH.NET is not connected with the server at the same moment (in other words, if State is set to Disconnected).If an error occurs during connection, SocketException will be thrown describing the error. If no error occurs, Connected event will be fired.
Upon connection, wodSSH.NET may perform initial 'handshake' with remote server, depending on protocol selected. It will negotiate encryption algorithms and other properties related to secured connection.
After handshake is completed, wodSSH.NET will perform automatic authentication with server.
Optionally, if Command property is set, wodSSH.NET will send specified command, wait for an answer from server, and disconnect automatically. If Command property is empty (default), wodSSH.NET will open shell on remote server and it will allow you to send/receive data.