Is this possible from wodSSH .Net component - WeOnlyDo Discussion board

Is this possible from wodSSH .Net component (General questions)

by zubenelgenubi, Saturday, May 19, 2007, 22:23 (6397 days ago)

Hi,

Downloaded the sample code and it looks like it will work for me to get to a single host using SSH, great!

What I would like to do is:

-SSH to a public-address host (cisco device)
-From that Cisco Device, telnet to another Cisco device which is configured to require a Password with the prompt 'Password:'. I need to submit the password for the 2nd Cisco device and then...
-Telnet again to a 3rd device which requires username (prompt 'Username:') AND password (prompt 'Password:')
-Submit a command on this 3rd device
-Cleanly exit the 3rd device using command 'exit', which when submitted the device responds with 'Press any key to exit...' before it closes the connection. I assume I have to send a CR here.
-Cleanly exit the 2nd Cisco Device with a command 'exit'
-Cleanly exit the public-address host with a command 'exit'

I assume this is all possible. Can anyone provide any guidance/code snippets or correct my assumptions.

TIA

Charlie

Re: Is this possible from wodSSH .Net component

by woddrazen, Saturday, May 19, 2007, 23:29 (6397 days ago) @ zubenelgenubi

Hi Charlie,


Yes that can be done.

You can create more than one instance of wodSSH.NET. In your case when you want to connect to 3 server in same time.

You should create 3 instance of wodSSH.NET and with each instance connect to server in same time.

Let us know how it goes.


Regards,
Drazen

Re: Is this possible from wodSSH .Net component

by wodSupport, Sunday, May 20, 2007, 00:04 (6397 days ago) @ woddrazen

Charlie,

I'd like to suggest you use Waitfor and Execute methods in blocking mode. You can use this post as a starting point, it's for ActiveX but idea is completely the same:

http://www.weonlydo.com/index.asp?forum=1&action=view&topic=1100211908#1100211908

Hope this helps!

Kreso