Error while connecting to Windows server via TELNET (2506 Views)
Reply
Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 1 of 23 (2,506 Views)
Accepted Solution

Error while connecting to Windows server via TELNET

Hi Friends

 

we face the following error while trying to connect to a windows server via Telnet from ITG.

 

error:


KSC Connect

Source Command: Env Check: Shell connection to Env server

Protocol:  com.kintana.core.net.TelnetClient
Host:      xxxxxxxxxxxx
Username:  xxxxxxx
NT Domain: xxxxxxxxx
Attempting to negotiate the terminal type.
Received: DO Terminal Type
Sent: WILL Terminal Type
Microsoft Telnet Server detected
Welcome to Microsoft Telnet Service
login:[2011/12/12 11:52:42 +0000] LOGON_ATTEMPT xxxxxxxx\xxxxxxxxx@xxxxxxxxx:23
 password:Received: SB Terminal Type ...
Received: SE
Sent: SB Terminal Type 'dumb' SE
 Issuing test commands to test the readiness of the remote host to receive commands.
Sending command..
waiting for something to read...
Received: SB Terminal Type ...
Received: SE
Sent: SB Terminal Type 'dumb' SE

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
The system cannot find the path specified.
C:\WINDOWS\system32>Sending command..
waiting for something to read...
echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2
C:\WINDOWS\system32>line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2
Doesn't contain a valid attempt number and exit status.
Sending command..
waiting for something to read...
echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3
C:\WINDOWS\system32>line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3
Doesn't contain a valid attempt number and exit status.
Sending command..
waiting for something to read...
echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 4'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 4
C:\WINDOWS\system32>line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 4'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 4
Doesn't contain a valid attempt number and exit status.
Sending command..
waiting for something to read...

 

this log goes on until Time out. Can some one please help on this case?

Frequent Advisor
Akif Saburi
Posts: 44
Registered: ‎03-15-2010
Message 2 of 23 (2,502 Views)

Re: Error while connecting to Windows server via TELNET

[ Edited ]

Hi,

 

Have you installed Cygwin in the NT Server.  If yes, then Cygwin is not properly configured.

 

The prompt "C:\WINDOWS\system32>"  indicates that PPM is connecting to Windows Default telnet service rather than Cygwin's Telnet service.

 

Refer to attached document and install or configure the cygwin

 

Regards,

Akif

Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 3 of 23 (2,496 Views)

Re: Error while connecting to Windows server via TELNET

Thanks

 

 

Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 4 of 23 (2,494 Views)

Re: Error while connecting to Windows server via TELNET

Also Akif.. we are trying telnet to XP OS machine.. is it fine?

Frequent Advisor
Akif Saburi
Posts: 44
Registered: ‎03-15-2010
Message 5 of 23 (2,488 Views)

Re: Error while connecting to Windows server via TELNET

Hi,

 

Here you Go..

 

I haven't tried to telnet to XP sysem from PPM.  But I guess it should work fine.

 

Regards,

Akif

Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 6 of 23 (2,474 Views)

Re: Error while connecting to Windows server via TELNET

Thanks Akif... we are in process of installing the same..

 

Will update you if its fixed :)

Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 7 of 23 (2,468 Views)

Re: Error while connecting to Windows server via TELNET

Hi Akif,

we got the attached error while installing... can u pls help us on this?

Frequent Advisor
Akif Saburi
Posts: 44
Registered: ‎03-15-2010
Message 8 of 23 (2,453 Views)

Re: Error while connecting to Windows server via TELNET

Hi,

 

It looks like setup file is corrupted.  Try downloading setup file from different Mirror.  Also make sure you have admin rights in the server.

 

Regards,

Akif

Advisor
sonaliashah
Posts: 21
Registered: ‎11-11-2011
Message 9 of 23 (2,438 Views)

Re: Error while connecting to Windows server via TELNET

Hi Akif,

In addition to the recommendations, also try to make sure that the Windows Server is also configured with Telnet server. This might, most likely, be your problem. Information for configuration could be found on Microsoft.com.

 

Sonali.

Honored Contributor
AlexSavencu
Posts: 595
Registered: ‎04-30-2010
Message 10 of 23 (2,433 Views)

Re: Error while connecting to Windows server via TELNET

Hi, Sonali,

 

the server is obviously configured to accept telnet connections, but telnet is not configured to run the cygwin environment - this is required in order for PPM to run the UNIX commands.

 

cheers

alex


--remember to kudos people who helped solve your problem
Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 11 of 23 (2,422 Views)

Re: Error while connecting to Windows server via TELNET

Thanks Akif,

 

we successfully installed CYGWIN; but after which also we get the same errors :(

 

KSC Connect

Source Command: Env Check: Shell connection to Env server

Protocol:  com.kintana.core.net.TelnetClient
Host:      xxxxxxxx.xxx.xxxxxxx.com
Username:  xxxxxxxxx
NT Domain: xxxxxx
Attempting to negotiate the terminal type.
Received: DO Terminal Type
Sent: WILL Terminal Type
Microsoft Telnet Server detected
Welcome to Microsoft Telnet Service
login:[2011/12/16 09:42:28 +0000] LOGON_ATTEMPT xxxxxx\xxxx@xxxxxx.stm.xxxxxxx.com:23
 xxxxx\xxxxxxxxx
password:Received: SB Terminal Type ...
Received: SE
Sent: SB Terminal Type 'dumb' SE
 Issuing test commands to test the readiness of the remote host to receive commands.
Sending command..
waiting for something to read...
Received: SB Terminal Type ...
Received: SE
Sent: SB Terminal Type 'dumb' SE

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
The system cannot find the path specified.
C:\WINDOWS\system32>Sending command..
waiting for something to read...
echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2
C:\WINDOWS\system32>line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2
Doesn't contain a valid attempt number and exit status.
Sending command..
waiting for something to read...
echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3
C:\WINDOWS\system32>line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3
Doesn't contain a valid attempt number and exit status.
Sending command..

Honored Contributor
AlexSavencu
Posts: 595
Registered: ‎04-30-2010
Message 12 of 23 (2,411 Views)

Re: Error while connecting to Windows server via TELNET

Hi,

 

you need to configure the telnet server to run cygwin in order for PPM to be able to send UNIX commands via telnet. check the cygwin documentation (there is plenty available) to check how to do that.

 

The other option is to use a cygwin sshd server.

 

I have a document which specifies all steps required, but I use it commercially, therefore I cannot share it via the forum.

 

cheers

alex


--remember to kudos people who helped solve your problem
Frequent Advisor
Rash
Posts: 40
Registered: ‎07-29-2010
Message 13 of 23 (2,401 Views)

Re: Error while connecting to Windows server via TELNET

HI,

 

Thanks for your notes;

But can any one please help us on how to get this configured as we still gett some error as above what i pasted.

 

password:

Received: SB Terminal Type ...
Received: SE
Sent: SB Terminal Type 'dumb' SE
Issuing test commands to test the readiness of the remote host to receive commands.
Sending command..
waiting for something to read...
Received: SB Terminal Type ...
Received: SE
Sent: SB Terminal Type 'dumb' SE


*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
The system cannot find the path specified.
C:\WINDOWS\system32>

Sending command..
waiting for something to read...

echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2
C:\WINDOWS\system32>

line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 2
Doesn't contain a valid attempt number and exit status.
Sending command..
waiting for something to read...

echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3
C:\WINDOWS\system32>

line: echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 3
Doesn't contain a valid attempt number and exit status.
Sending command..
waiting for something to read...

echo 'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 4'TEST_SESSION_RESPONSE'; echo KSC_EXIT_STATUS $? 4

Honored Contributor
AlexSavencu
Posts: 595
Registered: ‎04-30-2010
Message 14 of 23 (2,382 Views)

Re: Error while connecting to Windows server via TELNET

Hi,

 

since I cannot upload the full document, I am adding here the relevant information for configuring the Windows Telnet server for PPM:

 

0. Configure the Telnet Service to start automatically and start it.

Configure the shell startup script (“cygnus.bat”)

i)      Choose a location for the startup script.  Convention dictates that this script be located in the Cygwin root directory.  In this example, assume the Cygwin root directory is located at

C:\cygwin\.

ii)     You will also need the path to the Cygwin \bin\ directory.  In this example, assume the Cygwin \bin\ directory is located at

C:\cygwin\bin\.

 

iii)    In the Cygwin root directory, create a batch file named “cygnus.bat”, with the following contents:

 

@ECHO OFF

SET MAKE_MODE=UNIX

SET PATH=C:\cygwin\bin;%PATH%

bash -login -noediting -noprofile -i

 

 

Configure the login script (“login.cmd”)

A login “cmd” script is required during Telnet session initiation.  This can be as simple as a single-line “echo” statement, or it can perform additional functionality upon session startup if desired.

In the Cygwin root directory, create a cmd file named “login.cmd”, with the following contents (replace the echo string with any desired message):

echo 'welcome to <machine name>'

 

Configuring the MS Telnet server:

  • Edit the Telnet server registry entry to specify the shell startup and login scripts.

 

1.     Edit the MS Telnet server registry

Unfortunately, no interface was provided for specifying the shell startup script, so this must be done directly in the windows registry.  This is a simple operation – only two parameters need to be updated.

 

i)         Go to Start à Run, enter “regedit”, and click OK.

ii)       When the registry window opens, go to HKEY_LOCAL_MACHINE  SOFTWARE  Microsoft  TelnetServer  1.0.  When you highlight the “1.0” folder, the parameter list will be displayed in the right-hand panel of the registry window:

iii)      Double-click on the “LoginScript” entry.  Enter the full path to the login script you created above, and then click OK to apply the change.  In this example, it is C:\cygwin\login.cmd

iv) Double-click on the “Shell” entry.  Enter the full path to the shell startup script you created above, and then click OK to apply the change.  In this example, it is

C:\cygwin\cygnus.bat

 

*Note: Do not change the value of the “DefaultShell” entry.  This seems to have an adverse effect on the proper functioning of the MS Telnet server.

 

cheers

alex


--remember to kudos people who helped solve your problem
Valued Contributor
roxor
Posts: 131
Registered: ‎11-15-2010
Message 15 of 23 (2,329 Views)

Re: Error while connecting to Windows server via TELNET

Hello,

 

I have the same problem as Rash. I have followed your instructions Alex but without success.

 

Before, when I tried to check connection form PPM I have received error log with something like this:

 

Sending command.. 

waiting for something to read...

echo 'TEST_SESSION RESPONSE'; echo KSCEXIT_STATUS $? 1

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>'TEST_SESSION RESPONSE'; echo KSC_EXIT_STATUS $? 1

C:\Windows\system32>line: C:\Windows\system32>'TEST_SESSION RESPONSE'; echo KSC_EXIT_STATUS $? 1

Doesn't contain a valid attempt number and exit status.

..etc

Comand(s) timed out...

Reading available session output.

Session output processed:

 

'TEST_SESSION RESPONSE'; echo KSC_EXIT_STATUS $? 68

echo 'TEST_SESSION RESPONSE'; echo KSC_EXIT_STATUS $? 69

'TEST_SESSION RESPONSE'; echo KSC_EXIT_STATUS $? 69

 

(KNTA-10896)

 

It was obvious that telnet is connecting to ordinary cmd.exe and KSC_EXIT_STATUS have no sense there. Now after Alex intructions I made changes in Cygwin configuration. But it iseems to me that Cygwin doesn't react for any commands form PPM via telnet. Here is new message:

 

Sending command.. 

waiting for something to read...

Closing telnet session.

 

Comand(s) timed out...

Reading available session output.

Session output processed:

 

Welcome to Microsoft Telnet Service

 

ppmadmin

 

(KNTA-10896)

 

 

I don't know how to fix it now. Both first and second runs are running for ages but in the second I can see that at the end he was able to connect telnet or what is it... 

 

Do I need to install telnet also for Cygwin for example?

 

Thanks a lot,

r.

Valued Contributor
roxor
Posts: 131
Registered: ‎11-15-2010
Message 16 of 23 (2,317 Views)

Re: Error while connecting to Windows server via TELNET

Quick update:
I have now installed telnet to my cygwin. No help. When I use telnet via Cygwin directly, and telnet registers are updated in the way as alex descirbed (shell is pointing to cygnus.bat), I can't connect.

When are registers in the old way, I can connect via Cygwin and telnet, but for PPM this is not enough as windows cmd.exe is used...

How did you all managed to get this work:)
r.
Honored Contributor
AlexSavencu
Posts: 595
Registered: ‎04-30-2010
Message 17 of 23 (2,311 Views)

Re: Error while connecting to Windows server via TELNET

Roxor,

 

My customers are following exactly the steps described in my post and it worked for every project.

 

I don't really understand which command sequence you used in order to get to something like

 

Sending command.. 

waiting for something to read...

Closing telnet session.

Comand(s) timed out...

Reading available session output.

Session output processed:

Welcome to Microsoft Telnet Service

ppmadmin

 (KNTA-10896).

 

 

The error message you are getting is a PPM message. Before trying via ppm, you should try via command line. The following sequence works for my environment:

 

C:\WINDOWS>telnet ppm-dev

'welcome to my ownDEV Environment'

bash-4.1$.

 

 

You do NOT need to install telnet for cygwin. MS Telnet Server is enough.

 

Let me know the results of the above command.

 


cheers

alex

 

 



--remember to kudos people who helped solve your problem
Honored Contributor
AlexSavencu
Posts: 595
Registered: ‎04-30-2010
Message 18 of 23 (2,309 Views)

Re: Error while connecting to Windows server via TELNET

Just another note:

 

Since the world is getting more and more secure, the far better option is to install the cygwin SSHD server and use it in the PPM context. Another advantage is that the SSH provides both shell login (via SSH) AND file transfer access via SCP.

 

cheers

alex


--remember to kudos people who helped solve your problem
Valued Contributor
roxor
Posts: 131
Registered: ‎11-15-2010
Message 19 of 23 (2,306 Views)

Re: Error while connecting to Windows server via TELNET

Hello Alex,
thank s for your comment. I know that ssh is more secure but telnet is enough for me as I am using this telnet on very secured remote server.

That log in my previos mesage was from workbench, under Environment setting where I hae my server settings, click on Check and Server/telnet.

When I am trying to connect directly from cmd.exe as you sad in previous message, I get this:

C:\WINDOWS>telnet SERVERNAME
Trying 172.17.32.32...
Connected to SERVERNAME
Escape character is. ..
Welcome to Microsoft Telent Service

login: ppmadmin
password: XXXX
Connection closed by foreign host.
Honored Contributor
AlexSavencu
Posts: 595
Registered: ‎04-30-2010
Message 20 of 23 (2,304 Views)

Re: Error while connecting to Windows server via TELNET

Hi,

 

this may sound stupid: I had this very same issue once, and it looks like it was caused by the size of my command prompt window (changes are available in the layout tab in the command prompt window properties). Try using a small command prompt window (like the default one in windows).

 

cheers

alex


--remember to kudos people who helped solve your problem
Valued Contributor
roxor
Posts: 131
Registered: ‎11-15-2010
Message 21 of 23 (2,302 Views)

Re: Error while connecting to Windows server via TELNET

Hmmm:) I tried but no, I am using small window. Strange is, that it obviously can connect to machine because when I type bad assword, it says 'login failed'.

And when I use telnet without regitry changes, it is OK. Bad thing is, that PPM needs that registry changes. I suppose that problem is in my Cygwin.

Kind regards,
r.
Advisor
Alex Pronichev
Posts: 11
Registered: ‎05-03-2006
Message 22 of 23 (821 Views)

Re: Error while connecting to Windows server via TELNET

Please HELP! I have the same problem.
...
login: ppmadmin
password: XXXX
Connection closed by foreign host.
Advisor
Alex Pronichev
Posts: 11
Registered: ‎05-03-2006
Message 23 of 23 (816 Views)

Re: Error while connecting to Windows server via TELNET

I found solution.
Start Telnet Server service with Local System instead Local Service.
After that I have successful telnet connection with bash interpreter.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.