Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub address.to.host.B

On Host B

ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub address.to.host.A

What could be the problem?

EDIT:

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

share|improve this question

1 Answer 1

up vote 4 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

 
discard

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.