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 recently started renting space on a remote server so that I could work on a project. I found that a relatively painless way to access it on a windows machine is through PuTTY. However, there is one thing that has always irked me when using it: for seemingly no reason random characters are sometimes inserted at the cursor.

Most of the time it is just a single tilde, but rarely it spits out what looks like some escape sequence ([[^8 or the like). It will only occur when I am focused on the window, whether I am typing or 20 feet away from the keyboard. If left for long enough, it will spit tildes at random intervals (average is about 1 minute).

Finally, this behavior seems to be inconsistant when running programs such as nano or the mysql interface: in nano, instead of inserting tildes, it will set marks (ctrl-^); in mysql, lines will become un-editable.

My question is this: Has anyone else experienced this sort of behavior in PuTTY? And if so, what can be done to prevent/correct this behavior?

share|improve this question
Does your computer also do this if you leave open a random program on your host for a few hours, like notepad? –  ekaj Jan 29 at 6:08
@ekaj No, only in PuTTY. And aparantly PuTTY based programs like MobaXterm (I downloaded the portable version to test) EDIT: only during an SSH session in Moba –  Zachary Polikarpus Jan 29 at 6:39
Hmm. Are you sure it's not pretty close to periodic, like always 55-65 seconds while putty is entirely idle? If it is, it might be a "keep-alive" activity, either from the server end or maybe putty. Have a look at things found under a search "alive" in putty help. Maybe these will be helpful: superuser.com/questions/94436/… unix.stackexchange.com/questions/6105/… –  mgkrebbs Jan 29 at 8:54
@mgkrebbs Sometimes it seems periodic, but it occasionally won't occur for about 5 to 6 minutes, then go right back to seeming periodic. Regarding the keep-alive idea, if that is the case, It seems to be isolated to the client side because if I start an ssh session from a linux machine in native terminal, all is well. I did see that first link when I was asking the question, and tried changing the terminal type to "linux", but that didn't seem to make any noticable difference. –  Zachary Polikarpus Jan 29 at 13:10
I've been experiencing this issue as well. It shows up when I'm using Putty, Kitty and even MobaXterm. –  Attilah Apr 27 at 7:14

4 Answers 4

up vote 2 down vote accepted

I had the same problem with PuTTY and found that is was being caused by an application I have called "caffeine" which effectively presses the F13 key every minute to stop the screen saver from being activated (group policies prevent me from changing screen saver timeout on my machine). Disabling the application solved me problem.

share|improve this answer
I did have caffeine installed at the time! It all makes sense now... Thanks Bruce! –  Zachary Polikarpus Jun 7 at 2:12
Doh, I should've suspected that. Killing Caffeine did the trick. Thank you –  shreyansp Oct 8 at 9:40

This really does look like an escape sequence, or control character, which might explain why you don't see it in other programs like notepad.

I'm not quite sure which keys have to be pressed to get this output, but I'll play around a bit and try to find out. Can you name any other sequence shown? The behaviour of mysql and nano might just be another interpretation of the escape sequences that seem to get entered.

Finally, the question is what causes these key inputs. Do you, by any chance, use a laptop which e.g. automatically controls the backlight using some proprietary software? I've seen some weird preinstalled software actually emulating the keypresses instead of using the API. You might want to use something like inputlog on yourself.

share|improve this answer
I have since changed operating systems, first changing my dual Win-8.1 & Ubuntu to Ubuntu only, then to Mint, and finally to Arch. I have not experienced any similar problems, which leads me to believe that the problem was isolated to the manner in which Windows interacted with PuTTY. As for the cause of the key inputs, I would not be surprised if what you suggested was the case, however I did not use or notice any sort of automatic hardware control. If I still had those logs, I would post them. EDIT: If anyone else is experiencing this I encourage you to post this information. –  Zachary Polikarpus May 1 at 16:24
See also Gilles' answer in Why Putty inserting ~ into my Fedora bash shell, which nicely explains why one might only see the ~ (and hear a beeb) when actually something like \e[3~ is sent. –  Arjan May 3 at 12:18
(As an aside: you might want to link to that post, as at first I figured seeing a single ~ would not indicate an escape sequence.) –  Arjan May 3 at 12:24

Someone on Cisco forums suggests to change the console speed parameter to solve this problem.


You've definitely tried all the variations of console speed in Putty as mentioned in 1 ?

Note: If the baud rate is set different than the default rate, odd characters are seen on CLI. Check table1 to set baud rates for different Confreg values.

share|improve this answer
Console speeds are for serial connections. He's referring to a SSH connection. While SSH does have a "Terminal Speed" setting...I've never actually seen this cause an issue. –  Jared Apr 29 at 15:49

I also had the same problem and found that caffeine.exe was indeed the problem. At first I thought it could not be caused by caffeine.exe because I was using this for 2+ years on my old laptop. I tried changing caffeine.exe -useshift instead, but that sent ^C. Found another program, Mouse Jiggler, that keeps the screen saver away but does not send any Escape sequences in my Putty sessions anymore.

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.