SSH Broken?
A friend of mine recently came to me with a problem, when he was logging into a server via ssh he was getting an odd error:
user@example.com's password: The following connections are open: #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1)
As he was typing his password out popped this ‘strange error’. Now I do know and use ssh and was aware that this is a standard output from ssh but it should only occur when its requested by the user, not whilst you are typing a password. That’s when it struck me, my friend’s password started with the escape sequence that called the function! So the solution to this was simple, change the escape character.
Let me talk a little more about what I mean by an escape sequence. When you are using ssh there is several functions that you can call by typing particular key sequences. Looking at the ssh man page you can find a list of what is possible (search for Escape Characters).
~# List forwarded connections
Clever! Now to solve the issue where your password starts with that sequence you can alter your escape character from ~ to something else. Edit ~/.ssh/config on your local machine and put in:
EscapeChar $
Indeed you can select any character but in this case the sequence $# will now be the trigger. Sometimes the simplest issues can reveal additional abilities you may never knew existed. Problem solved!
Comments