1

Changing my bash shell when connecting to a remote server?

view story
linux-howto

http://askubuntu.com – I am looking for ideas on customizing my bash shell when I remotely connect to a server. Currently, I run the following in my remote bash shell to change the prompt to indicate that I am connected to a remote system: if [ -n "$SSH_CLIENT" ]; then text=" ssh" fi export PS1='\[\e[0;31m\]\u@\h:\w${text}$\[\e[m\] ' Additionally, I source the .bashrc file from the .bash_profile file when I ssh in to the remote server. At this point, the bash prompt is in red and indicates that I am connected via ssh appending ssh to the comand prompt like so: maggotbrain@rmote_server:~ ssh$ as opposed to usin (HowTos)