开发者

Restrict folder sharing over cygwin sshd

开发者 https://www.devze.com 2022-12-23 01:09 出处:网络
I recently installed a SSH server on my Windows 7 PC and created a separate user account for this. When i logged in using SSH, i could access all the windows directories.

I recently installed a SSH server on my Windows 7 PC and created a separate user account for this. When i logged in using SSH, i could access all the windows directories.

/cygdrive/c

/cygdrive/d

/cygdrive/e

How do i prevent this user from accessing all the win directories other than its home directory under cygwin /home/chuck/ ?开发者_JAVA技巧

Preferably i do not want the user to even view /cygdrive when the user types "mount".

Is there a easy way to do this?

I want to later allow remote users to log on to this machine and avoid messing up other things.

I know i can setup a separate machine but this is a plan for later.


I don't know specifically about Cygwin but in Unix in general you could use the chroot.


try changing the group of the ssh_user_name to Guest, then specifically allow rwx perms for the Guest group through the security tab in Windows. I have not tried this before, which I am going to try soon. This should be easier than denying access to each drive by adding the ssh_user_name, which is highly inefficient if you have many drives like I do.

The reason why i chose guest is because by default it is denied all access, which makes it easier to specifically choose which drive you want the ssh_user_name to have access to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号