Hopefully I'm in the correct forum for this one...
I just had a pretty simple question about SSH.
When I ssh to a server normally I do "ssh user@ip_address". I noticed once by accident I forgot to enter the username
when I was entering the command and it still attempted to connect and still offered me a "Password" Prompt. I knew the root
Password for that server so I just gave that a try and it worked...
So my question is, is "root" ALWAYS the default username for SSH logins when you don't supply a username?
Also, I'm assuming that "root" would need to be allowed remote login before that would be the case..?
It isn't. It is usually the one you currently are. So if you are currently the user willi, you and ssh somewhere without specifying the user name, you will try to authenticate as willi.
The default is the current username on the local UNIX box. And. Allowing root ssh is a bad thing in a high security environment. You can also get varying results with SSH protocol 1 and rhosts files, meaning some oddball user can log in as someone else.
We must manage servers in awfully difficult-to-get-to places -- "summer road only, and only in a dry month, no cell service or other humans for miles" kind of difficult -- and though we avoid root access whenever possible it's still occasionally useful. Direct root access is disallowed, and only a few particular users are allowed to sudo to it. ssh keys have automated everything that needs to be.