Super User is a question and answer site for computer enthusiasts and power users. 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'm running Windows 7, and am connecting to a Linux server using Putty. For some programs I'm writing, I need to be able to pass EOF to the input. On Linux I'd normally type Ctrl-Z, but in Putty that seems to exit the program. Ctrl-D doesn't seem to work either.

I have had a look at: , which suggests looking at , though it seems to be if I'm connecting to a Telnet server, which I'm not.

Any suggestions on what I could do?


share|improve this question
up vote 1 down vote accepted

With putty, you can use the "-raw" command-line option, and then sending CTRL-Z or CTRL-D should work.

share|improve this answer
I can't seem to login properly when I use -raw. It just gets stuck in a console displaying "SSH-2.0-OpenSSH_4.3". – joshhendo Mar 4 '11 at 5:31
The problem was in the program I made, I got it working on a local virtual machine. Ctrl-D does work in Putty. Thanks for the suggestion though. – joshhendo Mar 4 '11 at 5:54
You won't be able to login using the -raw option because, well, it's a raw connection that doesn't do anything automatically like a TelNet or SSH (the default) type of session will. I looked for keyboard options within PuTTY but didn't see anything regarding CTRL-D, so this could be a server-side implementation thing (look at your sshd_config settings for something that might let you change the keystroke). – Randolf Richardson Mar 5 '11 at 16:01

Try to press Ctrl+D several times. It works in my case.

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.