Re: Telnet to Switch (General questions)
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();
Complete thread:
- Telnet to Switch - Sandeep, 2008-02-25, 19:22
- Re: Telnet to Switch - woddrazen, 2008-02-25, 20:13
- Re: Telnet to Switch - Sandeep, 2008-02-25, 20:25
- Re: Telnet to Switch - woddrazen, 2008-02-25, 21:20
- Re: Telnet to Switch - Sandeep, 2008-02-25, 21:39
- Re: Telnet to Switch - woddrazen, 2008-02-25, 22:42
- Re: Telnet to Switch - Sandeep, 2008-02-26, 04:07
- Re: Telnet to Switch - woddrazen, 2008-02-25, 22:42
- Re: Telnet to Switch - Sandeep, 2008-02-25, 21:39
- Re: Telnet to Switch - woddrazen, 2008-02-25, 21:20
- Re: Telnet to Switch - Sandeep, 2008-02-25, 20:25
- Re: Telnet to Switch - woddrazen, 2008-02-25, 20:13