SOLVED Scale refuse SSH connection both when using password and key

SnoppyFloppy

Explorer
Joined
Jun 17, 2021
Messages
77
Hi

Since I reinstalled my PC I have this weird issue where TrueNAS Scale (22.02.4) will no longer accept my SSH connection no matter if I try to use key or password. SSH does work from my phone to Scale though and from my PC I can ssh into other servers so SSH on the PC is also working. Only the PC to Scale combo doesn't work.

What happens more specifically is that no matter if I try to ssh using key or password, Scale ask for the password and when I enter it, it is not accepted.

Setup:
1. ssh is (obviously) enabled on the server and (temporarily) configured through the GUI to accept password authentication
2. I have two users (one for PC and one for phone). Each user is setup the exact same way with their respective public keys registered
3a. From the phone ssh works
3b. From the PC, no matter if I do ssh -i ~/.ssh/id_ed25519 user@192.128.24.4 or ssh user@192.128.24.4 the server just ask for password and doesn't accept the password that I know belong to user

I've tried changing the password of user to something very simple, I've tried re-registering thepublic key, and I have tried restarting the ssh service but to no avail and now I'm out of ideas.

Any ideas?

EDIT: I don't know if it's relevant or not but after reinstalling my PC I changed my default user shell to fish but all the aforementioned ssh attempts have been done using the bash shell. I haven't tried from zsh.
 
Last edited:

SnoppyFloppy

Explorer
Joined
Jun 17, 2021
Messages
77
For anyone else having similar issues here is what solved the issue for me.

It was as simple as me having given to wide permissions (mode) on the users home folder on the Scale system which ssh apparently doesn't like.

I realised this when I had a look at the ssh service with systemctl status ssh that revealed a "warning" that the ssh connection had been refused because of "wrong ownership or mode of users home folder" or something like that.
 

ptyork

Dabbler
Joined
Jun 23, 2021
Messages
32
Thank you for sharing your fix. I was banging my head trying to figure out why the same exact public key worked for root but not for my user account. I had my home directory's group ownership set to something other than my default group. I guess ssh is persnickety about that. Now I know. :)
 
Top