KS10 Posted May 17, 2019 Share Posted May 17, 2019 Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019. Link Created mklink /d E "E:" mklink /d F "F:" Entry in sshd_config file ChrootDirectory c:/share Now When I connect to my Server via SCP using SFTP. I landed on the Share Dir. I am able to browse E and F Drive from Share Dir. However I am NOT able to view or copy any file for E & F . What I figured out is that via Hardlink or junction Link I can only see the Dir, But I can't view the content of the file and can't even copy the file. My Requirement is to Use Windows 2019 Server with OPENSSH Integrated with Active Directory Create hard Link for 5 Hard drive (2Tb Each ) to Share Folder So when user connect via SCP, then land in C:/Share Dir, and then from their they can go D,E,F,G Drive I need the SSH functionality integrated with active directory to authenticate users Link to comment Share on other sites More sharing options...
DevTech Posted May 27, 2019 Share Posted May 27, 2019 On 5/17/2019 at 5:40 PM, KS10 said: Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019. Link Created mklink /d E "E:" mklink /d F "F:" Entry in sshd_config file ChrootDirectory c:/share Now When I connect to my Server via SCP using SFTP. I landed on the Share Dir. I am able to browse E and F Drive from Share Dir. However I am NOT able to view or copy any file for E & F . What I figured out is that via Hardlink or junction Link I can only see the Dir, But I can't view the content of the file and can't even copy the file. My Requirement is to Use Windows 2019 Server with OPENSSH Integrated with Active Directory Create hard Link for 5 Hard drive (2Tb Each ) to Share Folder So when user connect via SCP, then land in C:/Share Dir, and then from their they can go D,E,F,G Drive I need the SSH functionality integrated with active directory to authenticate users It has been a while since I did this so my memory is not pulling up a direct answer for you but most likely it is because there are about 3 or 4 or maybe more ways to create low level Junction Points in Windows and most likely you used the wrong one! "With great power comes great complications" so the most sophisticated O/S on Planet Earth has a crazy list of many ways to do the same things all for some specific very focused reason. But when you get the Junction Points just right even to internal O/S bits, they survive all sorts of major O/S updates! Link to comment Share on other sites More sharing options...
Malone3V Posted June 13, 2019 Share Posted June 13, 2019 On 5/28/2019 at 1:31 AM, DevTech said: It has been a while since I did this so my memory is not pulling up a direct answer for you but most likely it is because there are about 3 or 4 or maybe more ways to create low level Junction Points in Windows and most likely you used the wrong one! "With great power comes great complications" so the most sophisticated O/S on Planet Earth has a crazy list of many ways to do the same things all for some specific very focused reason. But when you get the Junction Points just right even to internal O/S bits, they survive all sorts of major O/S updates blue stacks Instead of configuring the OpenSSH server for each user individually we will create a new group and add all our chrooted users to this group. Link to comment Share on other sites More sharing options...
Recommended Posts