Settings and SSH issues

Topics about hardware platform, power, memory, UPS, network adapter
Locked
User avatar
AJVienna
Posts: 4
Joined: 25 Nov 2020, 17:24

Settings and SSH issues

Post 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
Attachments
logs.zip
(2.33 KiB) Downloaded 71 times
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: Settings and SSH issues

Post by TMSupport »

We will check your log files first, and get back to you later.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
nullren
Posts: 5
Joined: 29 Nov 2020, 07:57

Re: Settings and SSH issues

Post 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 ~
User avatar
AJVienna
Posts: 4
Joined: 25 Nov 2020, 17:24

Re: Settings and SSH issues

Post 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
User avatar
AJVienna
Posts: 4
Joined: 25 Nov 2020, 17:24

Re: Settings and SSH issues

Post 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.
Locked