Hi Everyone,
I am trying to make a simple program written in visual basic 2010. Its purpose is to be able to issue unix commands and display the result. The code below works when I connect to Port 22, but when I changed it to Port 23, and run the program, it will hang and does not respond. I am sure that my connection info is correct.
I am trying to make a simple program written in visual basic 2010. Its purpose is to be able to issue unix commands and display the result. The code below works when I connect to Port 22, but when I changed it to Port 23, and run the program, it will hang and does not respond. I am sure that my connection info is correct.
Dim connInfo As New Renci.SshNet.PasswordConnectionInfo("SvrIP", 22, "Usr", "Pwrd")
Dim sshClient As New Renci.SshNet.SshClient(connInfo)
Dim Fsystem, FreeGB, PerFree As Renci.SshNet.SshCommand
Using sshClient
sshClient.Connect()
If sshClient.IsConnected Then
Fsystem = sshClient.RunCommand("df -g |awk '{print $1}'") '("bdf |awk '{print FS_USED $1}'")
lblOut1.Text = Fsystem.Result
Else
'some code....
End If
sshClient.Disconnect()
End Using
Thank you for taking the time to read, I hope somebody could help...- Kat