0

I connect to my Ubuntu EC2 instance over SSH and authenticate using a private key.

I am in the process of installing Cowrie on my Ubuntu instance and as per the instructions here: https://cowrie.readthedocs.io/en/latest/INSTALL.html I create a non-root user using the following command:

sudo adduser --disabled-password <userName> 

Once created, I then switch using su - <userName>

My question is, how do I leave this shell using my non-root account and return to my root account? At the moment I'm exiting the entire SSH session but this doesn't feel like the most efficient path to take.

0

1 Answer 1

2

As jesse_b commented, your su command simply entered into another shell as that username; typing exit will leave that shell and return you to your root shell.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.