I am on windows 8 using GIT bash to access a remote server via ssh. When I press Ctrl+Space in emacs running locally in console (emacs -nw), everything works as expected. However, when going over ssh, Ctrl+Space simply inserts a space, while other commands like Ctrl+X work fine.

Why doesn't Ctrl+Space get through? I have considered switching to a different terminal, but I am also curios as to why this is happening.

  • Why do you think Ctrl+Space is actually send as such? It might not be 'getting through' because it is sent as a simple space. – Anthon Feb 21 '14 at 7:58
  • At some point in the chain (my keyboard to the process on the remote server) The sequence Ctrl+Space is getting transformed into just Space, and I'm fairly sure it's the fault of ssh, since no such transformation occurs before ssh is in the chain – Shelvacu Feb 21 '14 at 8:01
  • I assumed that with locally you meant when using a keyboard connected to your remote server. If you suspect ssh, you could try and setup telnet and see if that doesn't have the problem if you go with telnet over a port forwarded with ssh (telnet in itself is not secure as your password could be spied). An ssh tunnel will not filter an that out of the telnet session. – Anthon Feb 21 '14 at 8:13

If you're running things through the windows "shell" (DOS box, whatever) -- from a command line, it's because the terminal doesn't have a special map for ctrl-space. An actual windows ssh client (putty, securecrt, etc.) handles the keyboard mapping itself, and will do what I assume you want done (send a null.)

  • using putty has worked, but I still don't know why ssh in windows command line doesn't work. – Shelvacu Feb 25 '14 at 4:34


Is actually the same as


I've had situations when space didn't work and then used @ which did, however less convenient to type.


Is it possible, you are running an implementation of zssh? According to the man page, Ctrl-Space is an escape sequence within a zssh session.

zssh behaves as an usual ssh session until the escape sequence is depressed ( default is ^@ which can be produced by pressing C-space, or C-2, or C-` ), which enables file transfer mode. A new prompt is then displayed, and commands can be executed locally to initiate file transfers (among other things). It roughly behaves as a local shell featuring line edition, history and completion (thanks to libreadline), globbing, and escape characters ( " ' and \ ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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