freeSSHd and freeFTPd

Remember me Registration (Optional)

Please note that there is no official support from the author for freeSSHd or freeFTPd. You should not expect to receive response on messages posted here.

Forums -> freeSSHd - General -> Sendind Ctrl+C
Reply | New topic

Andre Miranda

Anonymous
          
question.gif Sendind Ctrl+C 05-01-2006 12:30
Hi,

How can i send a command like Ctrl+C to break a running command using FreeSSHd?

My setup is:
Server: Windows 2003 Server with FreeSSHd
Client: Windows XP with Putty

Thanks in advance!
Reply with quote

freesshd
Your main contact

Postings: 936
Administrator
          
Re: Sendind Ctrl+C 05-01-2006 22:42
Did you try to click on Putty's icon on the top of the window and then select "Special command"->"Break" ??
Reply with quote

Andre Miranda
Anonymous
          
Re: Sendind Ctrl+C 06-01-2006 16:22
Yes, there was no result.
Reply with quote

dilettante

Postings: 42
Member
          
Re: Sendind Ctrl+C 15-01-2006 16:04
As far as I have been able to determine freeSSHd doesn't process CTRL-C properly (i.e. pass it to the shell). I just retested this (version 1.0.8) and it is still true.

If anything, it gets processed somewhat like a backspace from the behavior I see.
Reply with quote

André Miranda

Anonymous
          
Re: Sendind Ctrl+C 20-03-2006 22:48
I solved this problem by using OpenSSH+Bash+Putty.
Reply with quote

freesshd

Administrator
          
Re: Sendind Ctrl+C 23-03-2006 16:11
Not much a fresshd related solution, is it? :)

Quote:
I solved this problem by using OpenSSH+Bash+Putty.

Reply with quote

leo mendoza

Anonymous
          
Re: Sendind Ctrl+C 24-10-2006 18:36
Quote:
Did you try to click on Putty's icon on the top of the window and then select "Special command"->"Break" ??


I'm tailing a log on the remote machine, and sending the break (~B) doesn't do anything. The only way to stop tailing is ~.

My client is:
OpenSSH_4.1p1 Debian-7ubuntu4.2, OpenSSL 0.9.7g 11 Apr 2005

Thanks
Reply with quote

dilettante

Member
          
Re: Sendind Ctrl+C 29-10-2006 04:39
I'll have to review this again, I haven't tried it with more recent versions of freeSSHd.


In a little non-SSH shell service of my own I found this to be one of those messy things... but "doable."

However my solution is ugly. It requires that a console be allocated for every shell session, and shared between the server process controlling shelled processes. I detect CTRL-C and call GenerateConsoleCtrlEvent() passing the value CTRL_C_EVENT. This also means my server process gets interrupted, so I need to use SetConsoleCtrlHandler() to assign a callback to manage these sorts of events in that process. I'm not even sure this can be done on a thread, as I said I control each remote session with a whole new process.


From what I've read it seems that Windows makes it pretty tough to write a clean, generalized shell-handler for your own remote access services. Most of this relates to functionality tied to the Console Device. Clearly it can be done, because Microsoft's Telnet Service handles it gracefully. This might be one of those areas where they use undocumented APIs or something though.

I don't really expect this to be addressed by a new version of freeSSHd in the future.

The Cygwin-based stuff probably takes another route, such as using alternative shells instead of Cmd.exe
Reply with quote

Aku Orang Ipoh

Anonymous
          
Re: Sendind Ctrl+C 21-11-2006 02:24
Quote:
I solved this problem by using OpenSSH+Bash+Putty.

Reply with quote
 

Search the forum

Latest posts

Current version

Related sites

Internet & Security Components

VPN and Instant Messaging - all in one!

Zero config VPN