Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is the situation: I open a terminal in Ubuntu, and do ssh host-1, which works as expected. From host-1, I do ssh host-2, which again works fine and connects me to host-2. From host-2 I do, for example, echo "blah", which prints blah to the screen. Problem: If I do exit, the screen is cleared, and I am left with only the following:

Connection to host-2 closed.

How can I prevent the clearing of output from the screen generated by commands run on host-2 (i.e. blah, etc.), after I exit back to host-1?

Some debugging I've already done: I've had a friend login to host-1 and host-2, exactly as above, and when he exit's from host-2, his screen is NOT cleared. So it must be something to do with my environment...right? Any ideas what it could be?

I've tried this using PuTTY in Windows XP, and from a terminal in Ubuntu - same behaviour regardless.

Thanks in advance! Roy

share|improve this question

migrated from Sep 8 '10 at 11:14

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

Check ~/.bash_logout

It probably contains "clear" command. Comment that out.

Also, in a lot of terminals, (e.g. gnometerm) you can just scroll back up and see what was "cleared".

share|improve this answer
Yep, it was in ~/.bash_logout. Thanks :) – Roy Mar 13 '09 at 21:39
thanks. that's been driving me nuts for a while. :) – Tim Kennedy Oct 31 '11 at 14:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.