Add new user with sudo for ssh login

Add new server user with sudo for ssh login

create an SSH key pair on client

ssh-keygen

on the server using root account

adduser newuser

visudo

under # User privilege specification

root ALL=(ALL:ALL) ALL
newuser ALL=(ALL:ALL) ALL

find own public key (on client)

cat ~/.ssh/id_rsa.pub

add public key to server

nano ~/.ssh/authorized_keys

CISSP PMP