| Author |
Passing Ping Command Through Telnet
|
ranua agarwal
Greenhorn
Joined: Mar 31, 2010
Posts: 25
|
|
HI,
I am using following program to ping a remote server--
But i am getting this output :
SSH-2.0-4.1.0.34 SSH Secure Shell
Can anybody point out where is the problem?
Thanks,
Ranu.
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
|
Have you consult the JavaDocs for the same ?
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
|
You are using SSH (port 22) but treat it as Telnet. That's not going to work. Either switch to port 23, or use an SSH client.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
ranua agarwal
Greenhorn
Joined: Mar 31, 2010
Posts: 25
|
|
Thank you Rob for the response.
Well, i changed the port as 23, but getting exception--
As you suggested, now i am looking for SSH client. Meanwhile is there any api available that implemented this?
Thank you Sagar for showing interest in the problem.
Well, i went through java docs, but not in depth.
Anything mising?
|
 |
ranua agarwal
Greenhorn
Joined: Mar 31, 2010
Posts: 25
|
|
|
Can Mbean will be another choice?
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
ranua agarwal wrote:Thank you Rob for the response.
Well, i changed the port as 23, but getting exception--
That means that Telnet is not enabled, and SSH is your only option.
As you suggested, now i am looking for SSH client. Meanwhile is there any api available that implemented this?
java ssh
|
 |
 |
|
|
subject: Passing Ping Command Through Telnet
|
|
|