Part one: green statusbar
why my ssh connection to my vps has "[remote] 0:bash" in green color showing in my bottom terminal vindow
You're likely in a tmux session. In its default configuration, tmux displays a status bar like this:
tmux is a "terminal multiplexer"; it allows you to run multiple programs or just shells over the same SSH connection. You can then switch between them, split the screen to show several programs at once, or even disconnect and reattach to the same programs later. (Another such tool, slightly older, is screen.)
The basic keyboard shortcut in tmux is Ctrlb followed by a second key: c to create a new tmux window (they will be listed in the status bar and
* means the current one); n, p, 0, 1…9 to switch between windows; d to detach the entire session (you can reattach later by running
tmux attach); finally : to enter advanced tmux commands.
However, tmux does not start automagically. It only starts when you run the
tmux command to create a new session (or
tmux at to attach to a previous one). So if you see the green tmux status bar, it means you must have done that – or you ran a script that did more than just set up WordPress for you…
When all programs in a tmux window exit, that window closes. When all tmux windows close, tmux itself exits. From your description ("my vps has "
[remote] 0:bash" in green color") So if you want to just get rid of that damn thing, type
exit in the shell, and tmux will close. If that does not work, run
tmux kill-server and it should stop tmux completely.
Alternatively, you could just disconnect and reconnect – or, if you're seeing this locally, close the terminal window and open a new one. That wouldn't destroy the tmux session, however, just detach from it. You'd still be able to
tmux attach back to it.
However, if you disconnect, reconnect, and find yourself inside tmux again, then it means you somehow configured it to be started automatically... In this case, you would need to check the profile files –
~/.bash_profile – for any invocations of the
Part two: weird prompt
Where's the normal ssh line... "user@ip # ?" ... now it's only showing the hostname "@hostname ~ #"
The "ssh line" you mention (it is not SSH-specific, by the way) is called the prompt, or shell prompt sometimes. It is customizable...
...so it is not a problem in itself if the prompt looks different. It's only a problem when it looks different and you don't know why.
Again, if simply opening a new terminal window (or a new SSH connection) does not help, then you should check the shell's configuration. You're using the bash shell, which uses
~/.bashrc as its configuration script, and that's the most logical place for configuring the way prompt looks, but it's possible that the setting might be in
~/.profile as well. Read all three files, looking for anything that starts with
For the record, a simple
username@hostname path # prompt is configured using:
PS1='\u@\h \w \$ '