Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 have to computers with exactly the same configuration (same PS1 etc...). When I ssh from A to B the terminal correctly displays PS1 and file type colors (i.e. blue directories, green executables etc.)

But when I ssh from B to A PS1 is set to default and colors disappear. Furthermore, I created public keys to ssh without password from A to B and vice-versa. It works correctly from A to B but it doesn't work from B to A, again I repeated the exact same procedure on both pc:

On Host A

ssh-copy-id -i ~/.ssh/

On Host B

ssh-copy-id -i ~/.ssh/

What could be the problem?


The problem is that when I ssh from B to A bash is not called in B. But why?

share|improve this question
up vote 5 down vote accepted

the remote .bashrc file is not executed by default when connecting over ssh.

Adding source .bashrc to .bash_profile solved the problem. Still I don't know why it keeps asking for the password.

share|improve this answer

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.