0

Preamble (feel free to skip)

This is question is (mostly) a duplicate of: How can I change my (Linux) terminal's appearance when I SSH in to a remote machine?

Yes, it would make more sense to update my question, or leave comments for my answerers, rather than starting a duplicate. Unfortunately the Stack Exchange rules have made it impossible for a "new" user like myself (who has 5k+ rep and multiple gold badges on Stack Overflow) to do either of those here. So, the only way I can even communicate at all (and not even directly to the people who were generous enough to try and answer) is to start a new question. Please don't blame me, blame the overly paranoid Stack Exchange rules that prevent editing or commenting on your own question.

/preamble

Now, on to the question. I recently came way too close to accidentally running a "wipe database" command on a remote server, because I thought I was working on my local machine. This made me think "I need a way to turn my background red, or otherwise get an obvious visual difference when I'm ssh-ed in to a remote server."

So far two people were kind enough to suggest solutions, but both of their solutions basically involved modifying PS1 to make the host name red. That doesn't help however, because that just makes the host name red always. I'll just adjust to seeing red text in my prompt, then I'll log in to a remote server, come back a minute later, and forget that I'm anywhere special because I'll just see the red text I'm used to.

What I'm looking for is something like this:

http://code.google.com/p/contextual-ssh/

except for Linux (that is for Macs only).

Does anyone know of anything like this that allows me to somehow change the appearance of my terminal ONLY when I'm ssh-ed in to a remote machine?

6
  • 1
    This question is sort-of along the sames lines: How do you make it obvious you are on a production system?
    – rtf
    May 20, 2013 at 20:33
  • Thanks, that's exactly what I was looking for ... and now I can comment (odd). May 20, 2013 at 20:35
  • People with more moderator power than me, could you please mark this as a duplicate of the link @Tanner provided? May 20, 2013 at 20:36
  • The comment privilege comes at 50 rep, and there are no cross-site duplicates. Also, rather than commenting, flagging would be appropriate. I'm a little surprised considering you have 7.5k on SO.
    – rtf
    May 20, 2013 at 20:39
  • I'm gonna close this as a dupe of your previous question. If you weren't able to comment or edit it, that might have been because it wasn't yet associated with your user account after being migrated here. As @Tanner said, next time you can just hit flag and tell a moderator what's up, that'd be the easiest.
    – slhck
    May 20, 2013 at 20:42

0

Browse other questions tagged .