Using the Konsole terminal-emulator with KDE on Kubuntu 9.10 , I would like to have a different konsole profile (colors, icons) whenever I ssh into a server, so I can easily spot in which konsole tab i'm on the local machine and which i'm on the remote server. I have the different profiles set up, as for now I change that profile manually from the gui ...
The best way I have found is to create bash aliases to connect the servers. For example:
alias resetcolors="konsoleprofile colors=Local"
alias ssh-saturn="konsoleprofile colors=SaturnColors; ssh -X saturn; resetcolors; echo 'Welcome back'"'!'
saturn is the name of the server,
SaturnColors is the desired profile when connected to the server,
Local is your default color scheme for your localhost, and
-X is whatever ssh flags you want to use. Now, when you type
ssh-saturn, the konsole colors will change and you will connect to the server, after which, your color scheme will be reset (and receive a welcome back message).
This assumes that you have setup ssh keyless login.