Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want have a Telnet command inside the ssh command for executing the Telnet command at the remote machine ( I tried with the command

ssh Administrator@ telnet 8088

It is giving an error message like

command not found (error code:127),

But when I tried to execute the same Telnet command directly at it is executing fine. What is the reason?

share|improve this question
Which ssh server are you running on – quanta Sep 5 '11 at 18:02
It looks like you are Cygwin. Are you trying to invoke the windows version of telnet or the cygwin version (I assume there must be one). – Rilindo Sep 6 '11 at 3:02

Specify the full path to telnet:

$ ssh Administrator@ /usr/bin/telnet 8088 
share|improve this answer
also try nesting the command in single or double quotes, as I think ssh parses the arguments in a space separated list. – mbrownnyc Sep 2 '11 at 19:34
Putting the command into quotes is unnecessary. – MikeyB Sep 2 '11 at 19:53
Thanks for you response and i tried with the above specified two methods but still it is not working... :( – kishore Sep 3 '11 at 8:27
What did you get? – quanta Sep 3 '11 at 15:25
even is it not atall giving any error message it is just simply comming to command prompt with %errorlevel% =-1 – kishore Sep 5 '11 at 14:56

Because of you are connecting as Administrator user, so I think is a Windows server.

Make sure that you have C:\WINDOWS\system32 in your PATH:

$ ssh Administrator@ path

If not, try to use the full path to the telnet.exe:

$ ssh Administrator@ '"C:\WINDOWS\system32\telnet.exe" 8088'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.