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?
WeOnlyDo.Client.SSH
Implements code for SSH (Secure shell) client component.
Remarks
wodSSH.NET is a client component that provides support for communication with remote console-type services. It allows you to communicate encrypted (and secured, of course) with SSH1 and SSH2 (secure-shell) servers, as well as old-style Telnet server that support Telnet protocol (or any other plaintext protocol). For ones that don't know - the SSH transport layer is a secure low level transport protocol. It provides strong encryption, cryptographic host authentication, and integrity protection.With wodSSH.NET you can connect to SSH servers, which are standard today in remote console communication. wodSSH.NET is able to automatically determine if remote server is based on SSH1 or SSH2 protocol version, and communicate accordingly. It will provide you with information about remote server Fingerprint, so you can always get authenticated information about remote server.
wodSSH.NET can be used as scripting client. Easily, you can set it up to connect to server, execute one or more commands, wait for response, and just disconnect. And all of it fully automated. It also supports blocking and non-blocking operations, thus it's suitable for many environments, such as ASP.NET. When you're unsure when to send actual command, wodSSH.NET may help also. Using it's unique Prompt property, it can fire event for you whenever remote server sent command prompt to enter new command. All you have to do is send new command once this event is fired.
Code sample
- C#
- VB.NET
using WeOnlyDo.Client;
SSH Ssh1;
private void Form1_Load(object sender, System.EventArgs e)
{
// Initialize new instance
Ssh1 = new SSH();
// defined somewhere in the code
Ssh1.ConnectedEvent += new WeOnlyDo.Client.SSH.ConnectedDelegate(Ssh1_Connected);
// Set your login/username
Ssh1.Login = "your login";
// Set your password
Ssh1.Password = "your password";
// Any encryption is ok
Ssh1.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto;
// Set SSH version
Ssh1.Protocol = SSH1;
// Define command which we'll send to the server
Ssh1.Command = "ls -al\n";
// Connect, finally. Now wait for Ssh1_Connected event to occur
Ssh1.Connect(TextBox2.Text);
}
SSH Ssh1;
private void Form1_Load(object sender, System.EventArgs e)
{
// Initialize new instance
Ssh1 = new SSH();
// defined somewhere in the code
Ssh1.ConnectedEvent += new WeOnlyDo.Client.SSH.ConnectedDelegate(Ssh1_Connected);
// Set your login/username
Ssh1.Login = "your login";
// Set your password
Ssh1.Password = "your password";
// Any encryption is ok
Ssh1.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto;
// Set SSH version
Ssh1.Protocol = SSH1;
// Define command which we'll send to the server
Ssh1.Command = "ls -al\n";
// Connect, finally. Now wait for Ssh1_Connected event to occur
Ssh1.Connect(TextBox2.Text);
}
Dim WithEvents Ssh1 As WeOnlyDo.Client.SSH
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Initialize new instance
Ssh1 = New WeOnlyDo.Client.SSH()
' Set your login/username
Ssh1.Login = "your login"
' Set your password
Ssh1.Password = "your password"
' Any encryption is ok
Ssh1.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto
' Set SSH version
Ssh1.Protocol = SSH1
' Define command which we'll send to the server
Ssh1.Command = "ls -al" & Chr(10)
' Connect, finally. Now wait for Connected event to fire
Ssh1.Connect("your.host.com")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Initialize new instance
Ssh1 = New WeOnlyDo.Client.SSH()
' Set your login/username
Ssh1.Login = "your login"
' Set your password
Ssh1.Password = "your password"
' Any encryption is ok
Ssh1.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto
' Set SSH version
Ssh1.Protocol = SSH1
' Define command which we'll send to the server
Ssh1.Command = "ls -al" & Chr(10)
' Connect, finally. Now wait for Connected event to fire
Ssh1.Connect("your.host.com")
End Sub