color ssh/sftp -

Ed Greshko Ed.Greshko at greshko.com
Wed Jan 23 14:38:28 UTC 2013


On 01/23/2013 09:58 PM, Bob Goodwin - Zuni, Virginia, USA wrote:
> On 01/23/2013 08:35 AM, Reindl Harald wrote:
>> what is .bash and /home/bobg/sshcolor??
>> .bashrc of whatever user as shown
>>
>> the "[root at srv-rhsoft:~]$" aka promt is red
>> not a background-color change which is not possible AFAIk and unuseable
>
>    I think we have a problem with text encoding or something? Your
>    message contains odd characters.
>
>    This is a new F-18 and Thunderbird installation and I am trying to
>    copy and paste from your message, obviously there is a problem that
>    I have not seen before.
>

FWIW, the PS1 variable came through just fine here....

You can simply place

PS1="\[\033[1;31m\][\u@\h:\w]$\[\033[0m\]"

In the .bashrc file of the system where you want the prompt color to be "red"

Now, if you want your background to be different it can be done....  But it would open a new terminal.
To do this in KDE and konsole....

1.  On your remote system you'd define a profile for konsole with the background color you want for remote connections.  You can call it remote.

2.   Set up your ssh to use private/public keys so that password prompts are unnecessary.

3.  Then when you want to ssh to that system you just issue the command
     ssh -X systemname konsole --profile remote &    This will, of course, ope a new window  on your local system....but at least there should be no confusion.


-- 
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled


More information about the users mailing list