使用ssh登录到AWS EC2时如何在bash前缀中输出用户名和ip地址?

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.

如何获得ssh登录名以显示ubuntu在EC2上开始的原始前缀?

评论