Ssh in ubuntu with different users - Why the console is working differently?
I usually connect to many Ubuntu servers with the same user (ubuntu). For the first time i have created a new user (elliot) for Ansible and I'm starting to ssh with the new one. The strange thing is that with the default user when I ssh I have:
ubuntu@node2517
Everything works fine no problems. But if i ssh with the new user i have just:
$
And I can't for example use autofill, I can't select the previous command. It looks like something is not working or missing.
My question is how can i have the new user to behave like the old one? This mean ssh on the server and see:
elliot@node2517
Thanks
Solution 1:
Change the user's shell. The program which interprets your input (and displays the "prompt" text) is the shell, and most Linux systems come with two: bash
is the regular one, but if you forget to specify it when creating an account, you get the historical sh
instead.
(zsh and fish are also common choices, but they need to be installed first.)
You can use either chsh
or usermod
to change the shell path – the former command allows any user to do it themselves.
chsh -s /bin/bash elliot
(Note: When doing this as root, make sure to look at which shells are listed in the /etc/shells
file first, as the system might refuse logins for users whose shells aren't in that file.)