• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Sign in to follow this  

Issue Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019.

Recommended Posts

KS10    0

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

Share this post


Link to post
Share on other sites
DevTech    1,517
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!

 

 

Share this post


Link to post
Share on other sites
Malone3V    0
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.