- First of all it doesn't load my PS1. It just prompts me with a
$
- The arrow keys instead of doing what they're supposed to do, the just echo things like:
$ ^[[A
And that makes it very unusable. A couple of things to consider here:
- This only happens when I login through ssh, it doesn't happen when I login directly to the server.
- One of the users works pretty fine even with ssh; and that's the user that was setup during the installation of the OS (ubuntu server 14.04).
- When I
su - otherUser
from within that user that works fine, everything works fine.
Here's the .bashrc
in case you want to take a look at it (It is the same on all users including the one that works correctly):
function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } RED="\[\033[0;31m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" NO_COLOR="\[\033[0m\]" #PS1="[\u@\h \W]\$" export PS1="[\u@\h $YELLOW\W$NO_COLOR]$GREEN\$(parse_git_branch)$NO_COLOR\$ "
Here's an output log for when I try to login to the user the works properly ssh -vvv ubuntu@server
: http://paste.ubuntu.com/15436267/
Here's an output log for when I try to login to the user the doesn't work properly ssh -vvv adam@server
: http://paste.ubuntu.com/15436301/
-vvv
switches for both users (working and not working)? There will be some difference. – Jakuje Mar 20 '16 at 12:32/home
, /home/adam,
/home/ubuntu` and the respective*rc
and.profile
files. Also what is insshd_config
on server might be interesting. – Jakuje Mar 20 '16 at 13:15ssh -l thatuser -t thathost "bash -x"
or such. – thrig Mar 20 '16 at 15:47getent passwd mega | cut -d : -f 6-
? What makes you think that your.profile
isn't executed (your.bashrc
clearly isn't, but I don't see any clue that your.profile
isn't executed)? – Gilles 'SO- stop being evil' Mar 20 '16 at 18:12