Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter3.html#using-sysmenu , which suggests looking at http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html#config-telnetkey , though it seems to be if I'm connecting to a Telnet server, which I'm not.

Any suggestions on what I could do?

Thanks.

share|improve this question

2 Answers 2

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

 
discard

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.