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.

On Mac's iTerm app, when I ssh into remote machines and the connection is terminated by either power loss or connection failure, some of the time, readline in the terminal fails. At least, I think it's readline - the main symptom is that history-search-backward and history-search-forward no longer function. The part I can't understand is that it is broken on both the local and remote machines even after establishing a new connection. The other strange part is that the failure only happens some of the time, not every time I get disconnected.

I think this could be a problem with ssh, mac's terminal, or just the iTerm app, but I have no idea where to start looking. Any ideas would be appreciated, but with such a convoluted problem I can't really expect any solutions.

share|improve this question

migrated from stackoverflow.com Nov 16 '11 at 2:13

This question came from our site for professional and enthusiast programmers.

    
This is not a programming related question. Superuser or askdifferent would be a better option. –  Ikke Nov 13 '11 at 16:47
2  
Not sure what you're experiencing, but I suspect your terminal settings are getting thrown off by the way your ssh gets killed. Try typing "reset" in your terminal as a possible fix. –  bigendian Nov 13 '11 at 17:13
    
Thanks, reset fixed it - is that documented anywhere? –  keflavich Nov 14 '11 at 5:14
    
@Ikke: I flagged this post to be moved to superuser –  keflavich Nov 14 '11 at 15:49
    
@bigendian - That's the solution. Is it documented anywhere? I'll accept it as an answer if you post it. I'm still curious why in case anyone else has a thought... –  keflavich Dec 2 '11 at 21:14
add comment

1 Answer

up vote 1 down vote accepted

Your terminal settings are being through off by something, and the reset command can be used to fix them.

I'm actually not sure why this happens, but I suspect that some binary may be getting passed to the shell which is interpreting it as control codes that change how your shell operates.

share|improve this answer
add comment

Your Answer

 
discard

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.