You are not logged in.
Hello:
Those who are more savvy than I am in command line work and SSL'ing into other installations probably have been through this.
I am slowly learning to use ssh, which I find quite entertaining but more than once I've 'almost' goofed up and done something in the local terminal instead of the other terminal I had open to a Raspberry Pi also running Devuan ascii.
Is there a way to eg: when I open a ssh connection, have the terminal automatically show something that would differentiate it from a local one.
eg: the title bar or font colours.
I've looked at the terminal configuration settings but found nothing.
Thanks in advance,
A.
Offline
You can but the following line in all your ~/.zshrc (or ~/.bashrc perhaps)
function title() { echo -n "\033]0;$1\007"; }
and then use
$ title Bendigo
to change the terminal title. Endless possibilities....
Offline
Changing the prompt (PS1) is another option, for example: https://unix.stackexchange.com/question … st-via-ssh
Brianna Ghey — Rest In Power
Offline
Hello:
... the following line in all your ~/.zshrc (or ~/.bashrc perhaps)
function title() { echo -n "\033]0;$1\007"; }
and then use
$ title Bendigo
to change the terminal title.
Changing the prompt (PS1) is another option ...
Thanks to both. =-)
I'll have a look at how these wotk.
In the meanwhile I'll have to be extra carefull.
Cheers,
A.
Offline
I've got several systems I administer by ssh'ing from my main system so I had this problem too.
My main system sets the window title to match the prompt, eg to the following:
chris@rigel:~/bin
But most of the other systems don't set it. As a work around I created a directory named after each system on my main system, cd'ed into it and ssh'ed from there onto the other system. So the window title says something like:
chris@rigel:~/vega
which tags the window as being the one ssh'ed onto vega. It's not ideal but it helps.
Also on all my systems the prompt says the hostname as well as the current directory. Train yourself to look at it before doing anything. You might be able to set the prompt to different colours on different systems (although I prefer green prompt most of the time, but red if I need to run as root).
Chris
Offline