SSH to root account

HarambeLives

Contributor
Joined
Jul 19, 2021
Messages
153
I'm looking to be able to SSH to the root account. I don't mind if its direct, and I don't mind if its via su - with another account

I've googled it, and all sorts of forum threads come up, all linking to articles that just 404

I've taken a wild guess and made a new account in the wheel group, which then allows me to switch to the root account.

But, if I enable 2FA on SSH, it asks for the one time passcode for my new user "admin", however "admin" can't log into the UI, and I only have the "root" one time passcode

Am I missing something here?
 

HarambeLives

Contributor
Joined
Jul 19, 2021
Messages
153
I figured it out as soon as I posted, just edit the SSH service and check the box to allow root login. I really don't see the security risk as long as you have 2FA on

I probably read through 5 full threads full of people arguing about this, such a simple resolution though that is never mentioned!
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
I figured it out as soon as I posted, just edit the SSH service and check the box to allow root login. I really don't see the security risk as long as you have 2FA on

I probably read through 5 full threads full of people arguing about this, such a simple resolution though that is never mentioned!
If you configure public key cryptography for the root account, you can disable root logins on the SSH service and authenticate with a public key instead.
 

pedz

Dabbler
Joined
Jan 29, 2022
Messages
35
This is obvious to anyone who knows but it took me a few tries...

Account => Users => root => edit
Then paste in YOUR public key and click save.

THEN... (the part I forgot) `ssh root@truenas` ... (I forgot the `root@` part)

Also, under Services, start SSH and I clicked it so it starts automatically.

Yes... its all obvious after you figure it out.
 
Top