Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm pulling my hair out on this one, but i've been looking around trying to find the answer to why my ssh connection to my vps has "[remote] 0:bash" in green color showing in my bottom terminal vindow.

Where's the normal ssh line... "user@ip # ?" ... now it's only showing the hostname "@hostname ~ #"

I ran a bash script last night, installing WordPress, and I'm thinking that has something to do with this?

I am totally new to this, but hope someone could give me an idea what I've got myself into :)

share|improve this question
up vote 2 down vote accepted

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, 19 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 – ~/.profile and/or ~/.bash_profile – for any invocations of the tmux command.

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... 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 ~/.bash_profile or ~/.profile as well. Read all three files, looking for anything that starts with PS1=… or export PS1=….

For the record, a simple username@hostname path # prompt is configured using:

PS1='\u@\h \w \$ '
share|improve this answer
Thanks so much for an amazing reply Mantas! You saved my day figuring this out. Like you said, the bash script i ran did several things at once, and thats probably when it entered tmux in order to make that happen. Now since the job of the script is completed, but still gets me loged directly into tmux at ssh login as default, are there any cons of running in this "mode" - or is it more of a personal preference? – vpsnewbie Aug 16 '13 at 6:21
@vpsnewbie: tmux or no tmux is mostly preference. IMHO, the only actual problem is that you ran a script – ran it as root – and you don't even know what the script actually did, nor seem worried about the things it did or may have done. If it was, as you said, a WordPress install script, then what business does it have in reconfiguring your account to start things like tmux at all? – grawity Aug 16 '13 at 11:38
I understand your point of view, and i should have explained abit more. Although I wouldn't just try anything out of the blue, but in a safe environment like a test VPS, no harm is done. I wanna learn - and sure i'm gonna mess up a few places along the way. Just gotta make sure we learn something from them :) Now the script did actually setup a server environment, so it did quite a few things, including WordPress install at the end. The script i tried was LEMPress, and i think it worked out great when you explained the whole tmux mode! – vpsnewbie Aug 16 '13 at 22:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.