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.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

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

link|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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.