Page 1 of 1

Settings and SSH issues

Posted: 26 Nov 2020, 01:41
by AJVienna
Hi,

I have the F2-210 and have some issues with it:
  • Time Machine required me to do the whole backup after it somehow broke. I now have the latest TOS 4.2.06 which hopefully fixes this).
  • I want to put my git repositories on my NAS and connect my user via ssh. However, for some unclear reasons the NAS is not accepting my key. Although it is stored in authorized_keys below that user and this works perfectly fine with root user. However, I don't want to use the root user for this. ssh is enabled system wide on port 22 and for this user. For root no password is required, but the user always asks for the password regardless of the setup. I attached the logs.
  • Everytime I reboot the NAS all my configuration is lost (I have to mount my encrypted drives which is understandable, but also settings like SSH, AFP or SMB support, which can even be dangerous).
Hope you can help.

Kind regards,
Alex

Re: Settings and SSH issues

Posted: 26 Nov 2020, 12:32
by TMSupport
We will check your log files first, and get back to you later.

Re: Settings and SSH issues

Posted: 29 Nov 2020, 12:27
by nullren
i was unable to use my ssh key and it was annoying. logging in using ssh with the verbose flag (-v) helped me figure out where the problem was. down towards the bottom was this to helped me figure out my situation.

Code: Select all

debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /mnt/md0/User/myuser/home
looking at it, the permissions were 777.

Code: Select all

[myuser@TNAS-xxxxxx ~]$ ls -ld .
drwxrwxrwx 1 myuser root 8 Nov 28 15:23 .
ssh doesn't like when your homedir, ssh config dir, or authorized_keys files are too permissive. i fixed this by chmod 755 my homedir.

Code: Select all

chmod 755 ~

Re: Settings and SSH issues

Posted: 30 Nov 2020, 04:41
by AJVienna
Hi,
thanks for the hint, but in my case all permissions are the same for root and user alex. Thus it seems to be a different problem in my case. Also the I had the verbose logs attached. There was no useful hint for me in there.
Kind regards,
Alex

Re: Settings and SSH issues

Posted: 05 Dec 2020, 07:13
by AJVienna
Found the solution.
Edit /etc/ssh/sshd_config using e.g. vim
add the user you want to use to:
AllowUsers
line.
Restart ssh daemon. E.g. by turning it off and on again via the UI.