Windows Server 2019 SFTP Server
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\System32\OpenSSH\sshd.exe
SFTP Install
https://mushaaf.net/https-www-youtube-com-channel-uclop2-xarme45pg9x7umfoqsub_confirmation1/
The following are the steps to enable SFTP on a Windows server 2019:
- Go to Windows Settings–>Apps
- Click on “Manage optional features” Under apps and features menu
- Look for OpenSSH Server, check if it’s already installed, if not click on “Add a feature” to install it.
Go to Windows services and look for “OpenSSH Authentication Agent ” and “OpenSSH SSH Server” services.
Change both services startup type to “Automatic”, and make sure that they are both started.
Changing the root directory of OpenSSH server:
Browse to directory “C:\ProgramData\ssh” and locate “sshd_config” file.
Look for #ChrootDirectory and modify that line to:
ChrootDirectory “E:\SFTPRoot” and save the file. OR
sftp sftp-server.exe -d E:\SFTPRoot
Add \%u on the line to set to a folder per user.
No comments to display
No comments to display