How to fix «Please login as the user "ubuntu" rather than the user "root"»?

amazon
amazon-web-services
ubuntu

(Dmitry Fedyuk) #1
sudo su
mv /root/.ssh/authorized_keys /home/ubuntu
chmod 777 /home/ubuntu/authorized_keys 

Remove the string:

no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".\';echo;sleep 10"
chmod 600 /home/ubuntu/authorized_keys
mv /home/ubuntu/authorized_keys /root/.ssh

How to enable the `root` SSH login in Debian / Ubuntu (if it is disabled)?
How to become `root` in Debian / Ubuntu?
(Dmitry Fedyuk) #2

See also: