2

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.

2 Answers 2

1

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

3
  • 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
    Commented Mar 4, 2011 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
    Commented Mar 4, 2011 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). Commented Mar 5, 2011 at 16:01
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .