jeudi 29 octobre 2009

visually identify ssh session console tabs

add this to the server user's .bashrc :

if [ "x$SSH_CONNECTION" != "x" ]; then
export PS1="\[\033[01;35m\][ssh]\[\033[00m\]$PS1"
fi


It will prepend your server prompt with [ssh] allowing you to visually identify when you're on a shell session on it. of course you could just color the hostname or something else, but you get the idea. sometimes a visual cue is better than having the hostname in the prompt.

Aucun commentaire: