I've setup a machine on EC2 running Debian stretch. Upon trying to ssh as root, I get the following message:
$ ssh -i "mykey" root@machine Please login as the user "admin" rather than the user "root".
^CConnection to machine closed.
^C - the command doesn't terminate.
I can login as
admin without a problem, and I'm aware of why this is done - I'm not sure about how, though.
My first hunch was the shell
admin@machine:~$ grep root /etc/passwd root:x:0:0:root:/root:/bin/bash
Nope. I checked nologin just in case:
admin@machine:~$ /usr/sbin/nologin This account is currently not available.
What is the mechanism that makes the system print out the message on login?