sudo adduser <username>
This command creates a new user and prompts you to set a password. The system will also ask for optional user details (full name, room number, etc.).
sudo usermod -aG sudo <username>
usermod modifies a user account. aG sudo adds the user to the sudo group, granting administrative privileges.
su - <username>
sudo whoami
su -

sudo systemctl start ssh
sudo systemctl status ssh
Displays the status of the SSH service to verify that it’s running.
ssh <username>@<server-ip>
username is the user created earlier.
server-ip is the IP address of the Ubuntu server.
If successful, you should gain access to the server remotely.
