Skip to content

Instantly share code, notes, and snippets.

View codebeta's full-sized avatar
:octocat:
I'm a leaf on the wind. Watch how I soar.

Nicole Daniella Murillo codebeta

:octocat:
I'm a leaf on the wind. Watch how I soar.
View GitHub Profile
Private lclSSHClient As Renci.SshNet.SshClient
lclSSHClient = spmltMain.sshClient
Public Class clsCommandData
Public cmd As String
Public output As Renci.SshNet.SshCommand
End Class
sshClient.Disconnect()
Private Sub sshConnectionCheck_Tick(sender As Object, _ e As EventArgs) Handles sshConnectionCheck.Tick
If sshClient Is Nothing Then
sshConnectionStatus.Text = “Disconnected”
sshConnectionStatus.Image = My.Resources._1421807635_disconnect
Else
If Not sshClient Is Nothing AndAlso sshClient.IsConnected Then
sshConnectionStatus.Text = sshClient.ConnectionInfo.Host.Split(“.”).FirstOrDefault.ToUpper
sshConnectionStatus.Image = My.Resources._1421807639_connect
Else
sshConnectionStatus.Text = “Not Connected”
sshClient = New Renci.SshNet.SshClient(sshConnectionInfo)
sshClient.Connect()
sshConnectionInfo = New Renci.SshNet.PasswordConnectionInfo(SSHHost.Text, SSHUser.Text, SSHPass.Text)
If Not sshClient Is Nothing AndAlso sshClient.IsConnected Then Exit Sub
Private sshConnectionInfo As Renci.SshNet.PasswordConnectionInfo
Public sshClient As Renci.SshNet.SshClient