SSH Clears Terminal on disconnection

I found on some servers that when I disconnect from an SSH connection, the terminal console is cleared.

This is very annoying if I have to SCP a file after disconnecting, and I cannot remember the path/filename.

So, on the remote server, check the .bash_logout file in the user’s home folder. This will contain commands to run when that user disconnects, and in this particular case, it had

/usr/bin/clear

I commented that out, and we’re sorted. (Mind you, you might want to check with the server administrator before fiddling as it could be a server/company policy)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>