Register to post in forums, or Log in to your existing account
 

This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.     Home » Forums » TeSSH Discussion
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Wed Apr 29, 2009 3:53 am   

[3.06] <Enter> doesn't work when using SSH towards Windows server
 
If I try to use SSH in any way towards a Win2003 server (in this case), pressing <enter> doesn't work (nothing happens). I can continue to type regular keys as well as backspace, but not <enter>.

SSH to a Solaris server works fine, but if I then try to connect to the Windows machine through the Solaris server, I still hit the problem (using either SSH or telnet).

Here are the combinations I tried:

1. (ok) Telnet directly to Win2003 server.
2. (ok) SSH to Solaris machine only.
3. (not ok) SSH directly to Win2003 server.
4. (not ok) SSH to Solaris machine, and then telnet to Win2003 server.
5. (not ok) SSH to Solaris machine, and then SSH to Win2003 server. (See note)


Note: In the case where I SSH to the Solaris machine and then SSH again to the Win2003 machine, I use the syntax "ssh Administrator@<server name>". In this case, it will then prompt me only for a password since it already knows the user name at login. I can press <enter> once for the password (which is accepted), but then <enter> doesn't work again after I get a regular prompt.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Wed Apr 29, 2009 8:12 pm   
 
What terminal emulation mode are you using? Does it only fail with "xterm" (the default), or does it also fail if you set the terminal type in TeSSH to VT100? It sounds more like a newline problem on the server. If there is a server you could set up an account for me to log in to then I might be able to test it and get it working. I don't have access to any Win2003 server here.
Reply with quote
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Wed Feb 03, 2010 9:39 pm   
 
Now that I'm using TeSSH again, I better follow up on this since it's a big problem.

With v3.13, the problem where <Enter> doesn't work is the same.

Using either XTERM or VT100 doesn't change the behavior (I don't know if using lowercase for these would make a difference or not).


I also reproduced the problem again (for #4 of the original scenarios I posted) using only a single machine (my Vista laptop) with the following setup:

1. Make sure the built-in Windows telnet server and telnet client are installed.
2. Start the Windows telnet server.
3. Setup and run sshd with Cygwin (see http://www.noah.org/ssh/cygwin-sshd.html for basic instructions)
Note: Use Cygwin 1.7.1.x or later, especially on Vista.

4. Use TeSSH to connect to localhost via SSH, and log in.
5. Within that SSH connection, use the Windows 'telnet' command to telnet to localhost again.

Result:
You can start typing your username, but pressing <Enter> doesn't work.

You can issue <Ctrl-]> to get to the 'telnet>' prompt, and then type "quit" to break out of the telnet session -- pressing <Enter> does work within the 'telnet>' prompt after <Ctrl-]>.


By the way, you can stop sshd after you're done by issuing 'cygrunsrv -E sshd' in the cygwin terminal.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Wed Feb 03, 2010 9:50 pm   
 
I'll install the Cygwin software and give this a try. However, my guess is that it's an issue with the combination of Cygwin and Windows telnet processes.

When TeSSH has made an SSH connection to a server, the TeSSH client is supposed to just send a chr(13) (CR) key to the server when you press Enter. The Windows telnet client that you run in step 5 is responsible for converting the CR key into the proper CR/LF newline for the telnet session. That is why Enter works within the 'telnet>' prompt...because that is still part of the SSH connection.

So it sounds more like the Windows telnet command just isn't handling the keys properly. Is this something that magically works with PuTTY? If so, I can test that and see what PuTTY is sending instead of the #13 that works properly.
Reply with quote
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Wed Feb 03, 2010 10:05 pm   
 
It's definitely not a Cygwin-specific problem, since this affects connecting to Windows with SSH involved anywhere in the 'chain' of connections.

For example, I have the same problem when I SSH directly into Windows running other SSH servers (F-Secure or Tectia, for example), and also when I SSH into a real Solaris machine then telnet to Windows. Note: In that last case it was the Solaris telnet command.

Oddly, I *can* ssh to localhost with TeSSH if it's the Cygwin sshd server, though there is an initial network delay for me (unrelated issue).

Using PuTTY has always worked with any telnet and SSH sessions (or combinations) in our network.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Thu Feb 04, 2010 12:37 am   
 
OK, I've never used Cygwin myself, so bear with me.

I tried installing the latest version of Cygwin based upon your instructions. Then I ran the sshd server. I could make an SSH connection to "locahost" with TeSSH, but not from another machine on the local network using the 192.168.0.1 IP address, so somehow Vista is blocking remote SSH connections (or some configuration in Cygwin that I have no idea about).

But anyway, using TeSSH on the local machine connects via SSH. Then when I try step 5 for using "telnet", nothing happens. In a normal Windows command prompt, telnet works. But from the SSH connection in TeSSH, I'm just getting the "zugg@ZuggDev ~" prompt again when I type telnet.

Can you tell me what step I have missed? Maybe I didn't know what other Cygwin packages to install other than the ones mentioned in the SSH help above.
Reply with quote
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Thu Feb 04, 2010 6:42 pm   
 
Hum... I'm not a Cygwin expert either, but I did just realize I made a mistake.

Even though I installed the Windows telnet client, I had also installed the Cygwin telnet client previously (and forgot that I did).

So in my case I was actually using Cygwin's telnet client in step 5 (Running 'telnet --version' shows "telnet (GNU inetutils) 1.5").

To install Cygwin's telnet client, run the setup again and pick 'Net --> inetutils' (any other previously installed packages will remain installed, so don't worry about them).

Hopefully that should work for you, sorry for the mixup!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Thu Feb 04, 2010 8:16 pm   
 
OK, I got the Cygwin telnet installed and reproduced the problem. As I expected, the Cygwin telnet tool is requiring a CR/LF and TeSSH is just sending just a LF because TeSSH is in SSH mode. Somehow there must be a way to detect that the remote server is switching to Telnet, but I'm going to need to research this some more. I don't see anything in the standard protocol RFCs that describe this so far.

Edited: Debugged the low-level protocol stream, and when I type "telnet localhost", nothing is sent to TeSSH at all to indicate the Newline mode has changed in any way. I'm really perplexed. I'll try running PuTTY and do another low-level capture to see what it is sending instead of a plain LF newline.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Thu Feb 04, 2010 8:32 pm   
 
Found it!

Geez I feel stupid. The proper newline for SSH is a single CR. TeSSH was sending a single LF. So this was completely my fault. It should be fixed for the next version later this week and you can let me know if this changed caused any problems with any other SSH servers.

Well, at least I have a good local test server for SSH now :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Sat Feb 06, 2010 3:53 am   
 
Let me know if this is fixed in v3.14.
Reply with quote
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Sun Feb 07, 2010 10:43 pm   
 
Looks fixed, thanks!
Reply with quote
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Home » Forums » TeSSH Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net