I launched an Ubuntu 18 instance on EC2.
I connected to the server using ubuntu user.
I created a new user named newuser and added it to the sudo group.
Then I ran:
rsync --archive --chown=newuser:newuser ~/.ssh /home/newuser
in order to let the new user to connect to the server directly.
When I'm trying to connect to the server using the new user I'm getting the following error:
Using username "newuser".
Authenticating with public key "imported-openssh-key"
Please login as the user "ubuntu" rather than the user "root".
I get the same error from both MobaXterm and PuTTY.