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


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)