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)

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.