Archived Forum Post

Index of archived forum posts


SSH issue with Send commands

Mar 16 '14 at 01:40

I've created a program in VB.NET and when it starts I click the connect but and I can send commands as much as I want/need over and over not a issue. but when I disconnect the connection by calling ssh.disconnect it disconnect and when I reconnect it connect fully but my issue is when I try to send a command I get this error

DllDate: Dec 12 2012
UnlockPrefix: JTTNETSSH
Username: BROCK-PC:Brock
Architecture: Little Endian; 32-bit
Language: .NET 4.0
VerboseLogging: 0
SshVersion: SSH-2.0-RomSShell_4.61
charset: ansi
numChars: 20
byteCount: 20
channel: 0
Channel not found

on this line of code

cmd = "show int eth 1/1/" & TextBox1.Text
            success = ssh.ChannelSendString(channelNum, cmd & vbCrLf, "ansi")
            If (success <> True) Then

                MsgBox("Technical details:" & vbCrLf & ssh.LastErrorText, vbCritical)
                Exit Sub
            End If

I have to close out my program and reopen it and connect again. Am I missing something here? I haven tried to dispose all my variable to test to somewhat simulate a restart of the program.

thank you Brock


I figured it out.

When you programs start it creates a new SSH chilkat.ssh

when I would disconnect it would needed to be created again. so on the connect button I put ssh = new chilkat.ssh

thank you Brock