0

By default, when creating an ubuntu 18.04 EC2 instance, and logging in with ssh, my bash prefix shows my username and ip address like so: ubuntu-12.123.123.123$. After deleting the default ubuntu user in my instance, and creating a new user, when logging in with ssh the only prefix I get is $ in my terminal. This makes things very difficult when loggin into multiple servers at the same time, as one can easily confuse one servers terminal from the other without that prefix.

How can I get my ssh login to show the original prefix that ubuntu starts out with on EC2?

3
  • This is down to the login shell that you set for the user, and how the shell defines its prompt string (e.g. setting PS1 inside the user's ~/.bashrc) Apr 24, 2020 at 13:44
  • How exactly do I set PS1 in ~/.bashrc?
    – DanRan
    Apr 24, 2020 at 13:50
  • How exactly did you create the new user? usually, you would arrange for a default set of "skeleton" configuration files to be copied from the /etc/skel directory - including a default .bashrc file with a suitable PS1 definition. Apr 24, 2020 at 13:55

0

You must log in to answer this question.

Browse other questions tagged .