Sample Header Ad - 728x90

StrictModes enable or disable in sshd_config in Linux

1 vote
1 answer
10207 views
I have got question for you. I need to solve this problem. I have got folder /keys which chmod 755 on /keys folder and ACL right such as setfacl -d -m u:myadmin:rwx /keys In /keys folder are others folders such as user1, user2, user3 in each user1, user2, user3 folder are specific public.key for SSH access And now there is my problem: If I have got enable StrictModes in sshd_config, user1 during ssh connection received error message "Bad Ownership or Modes for Directory", because on folder user1 root has got rwx rights and also myadmin has got rwx rights. When I remove rights of myadmin all is OK and all is work. But I need have myadmin for manage public keys in these folders. So I tried disable StrictModes in sshd_config and all is OK and working. But I think disable StrictModes is not good idea for security. I have got all users, admins chrooted in specific folders in the system. What do you think? There is any other solution for this problem? Or it can be disabled for solution of this problem ? --- RE: All users are chrooted in the directory and can't login via putty,console.. They can connect only via ssh. After login they see their folders which specific rights, can't move outside from chrooted directory. However I need each user need access specific folder which are on different place which is outside of chrooted folder of each user. User doesnt know about outside folder, its only for server access to write down some files. Thats all. With setfacl -m u:user:rwx and StrictModes on user can't login via ssh. If i turn of StrictModes, user can connect via ssh. I know StrictModes specifies wheter ssshd should check file modes and ownership of the user files and home directory before accepting login. Or there is another solution ? Thanks
Asked by SED85 (45 rep)
Jul 17, 2020, 10:58 AM
Last activity: May 31, 2025, 02:03 PM