diff --git a/.profile b/.profile index 40866dbc..15f68d94 100755 --- a/.profile +++ b/.profile @@ -283,7 +283,7 @@ _ps1bash() { # Add hostname prefix in SSH sessions unset prefix # Alert if in an SSH session - if [ "$SSH_CLIENT" ]; then + if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then prefix="${fg_bold}${fg_red}ssh${r}${fg_red}:${r}${prefix}" fi # Change PWD color depending on the shell