Quantcast
Channel: Active questions tagged ssh - Ask Ubuntu
Viewing all articles
Browse latest Browse all 879

Show a tag in parentheses when connecting through SSH

$
0
0

This is probably a pretty silly question, but one that I can't find the answer anywhere because of the description of the problem:

I have 2 linux servers. One is TEST and another is PROD

when I connect through SSH to them, this is what's shown:

(TEST) ubuntu@ip-XXX-XXX-XXX-XXX:

and

(PROD) ubuntu@ip-XXX-XXX-XXX-XXX:

How do you configure each server to show that tag? And how to manage it if I want to replace/remove?

EDIT:I've found out why but not sure how.The servers are hosted in AWS, so it's some custom Linux image they are using.The server is forwarding a parameter called "environment" in AWS tags into the bashrc but I can't find where is doing that

EDIT2:

Thanks for pointing out, it was totally in the .bashrc and was prefixed manually after all the configs were done with a command

PS1="(TEST) $PS1"

Viewing all articles
Browse latest Browse all 879

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>