Default User with SSH?

Hello All,

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..?

Any thoughts would be great.

Thanks in Advance,
Matt

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.

1 Like

Hey Zaxxon, thanks for the reply...

Ahhh... Yes that sort of sounds familiar, makes sense. Thanks for the Info!

Thanks Again,
Matt

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.

Hi,

The only time you should be allowed to login directly as root is when you have connected to the console device of the system.

Call me old fashioned if you like, but in the main this has been the rule for the last 30 years or so!

regards

Dave

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.