Another way is to make function for ssh:. function ssh(){ /usr/bin/ssh $@ ; exit ; } Unfortunately it also will always close the connection and logout from console after you'll finish work on the remote system. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.