Telnet to Switch - WeOnlyDo Discussion board

Telnet to Switch (wodSSH / wodSSH.NET)

by Sandeep, Monday, February 25, 2008, 19:22 (6117 days ago)

I am not able to establish a tenet connection to port 10023 on our provisioniing switch. i am able to conenct to port 23 though. Any thoughts on what I need to change in the below code?

Ssh1.Hostname = mydomain.com ;
Ssh1.Login = username ;
Ssh1.Password = password ;
Ssh1.Blocking = true;
Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.Telnet;
Ssh1.Port = 10023;

Ssh1.Timeout = 10;
//Ssh1.TerminalType = tty ;
Ssh1.Connect();

String a;

a = Ssh1.Receive();
Response.Write( <pre> + a + </pre> );
Ssh1.Disconnect();


Thank you,
Sandeep

Re: Telnet to Switch

by woddrazen, Monday, February 25, 2008, 20:13 (6117 days ago) @ Sandeep

Sandeep,


Your code looks fine. I cannot duplicate your problem. It works for me on port 10023.

Can you maybe give us your Hostname so we can test it with your server?

Did you maybe receive some error? Can you connect there with some other telnet client like Putty for example?


Drazen

Re: Telnet to Switch

by Sandeep, Monday, February 25, 2008, 20:25 (6117 days ago) @ woddrazen

It works if I do not specify the login and password before coonect method. below is the code I used. But I would prefer not having to do these extra steps. The error i receive if I use my previous code is Timeout occurred due to inactivity.

SSH Ssh1 = new SSH();

Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.Telnet;
Ssh1.Port = 10023;
Ssh1.Timeout = 10;
Ssh1.Blocking = true;
Ssh1.Hostname = mydomain ;
Ssh1.Connect();

String a= ;
a = Ssh1.Receive();
Response.Write( <pre> + a + </pre> );
a = Ssh1.Execute( username
,
Enter Password
);
a = Ssh1.Receive();
Response.Write( <pre> + a + </pre> );
a = Ssh1.Execute( password
,

, 10);
a = Ssh1.Receive();
Response.Write( <pre> + a + </pre> );
a = Ssh1.Execute( command
, > , 10);
a = Ssh1.Receive();
Response.Write( <pre> + a + </pre> );
Ssh1.Disconnect();

Re: Telnet to Switch

by woddrazen, Monday, February 25, 2008, 21:20 (6117 days ago) @ Sandeep

Sandeep.


I see. In order to deal with your problem we will need to duplicate it somehow. Is there any chance that we could connect there and delicate it?

We will just connect few times duplicate it and immediately disconnect.


Drazen

Re: Telnet to Switch

by Sandeep, Monday, February 25, 2008, 21:39 (6117 days ago) @ woddrazen

I spoke to our server aadmin adn he said thats not an option. Can you point me in any direction as to what other properties I can try (if any).

Thanks

Re: Telnet to Switch

by woddrazen, Monday, February 25, 2008, 22:42 (6117 days ago) @ Sandeep

Sandeep.


Maybe you can send us log file from Putty (SSH and Telnet client). From log we could find out what should we send in Login and Password Property to connect to your server.

In Putty you can enable log file under Logging options select Log printable output only and save it to some file and send it to techsupport@weonlydo.com


Drazen

Re: Telnet to Switch

by Sandeep, Tuesday, February 26, 2008, 04:07 (6116 days ago) @ woddrazen

I emailed the putty Log file.

Thanks