question

AskAlways-3728 avatar image
0 Votes"
AskAlways-3728 asked AskAlways-3728 edited

sftp in windows

Trying to get sftp set up for the first time. Basically, a third party application hosted in the cloud wants to sftp to on-prem server to pull files. I see references to openssh server in windows 2019 but cannot find a good documentation on using it for sftp purpose. (third party application wants a sftp url).

What are the steps in setting up sftp after installing openssh server in 2019? And, is there any url associated with sftp? Thanks.

windows-serverwindows-server-iiswindows-server-security
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeonLaude avatar image
1 Vote"
LeonLaude answered HippopotamusDefence-7970 commented

Hi @AskAlways-3728,

I'm not sure if you can configure an SFTP URL, well you can always use a DNS name/ IP address.
Here's the official Microsoft documentation for setting up an OpenSSH Server on Windows Server 2019 / Windows10:

Install OpenSSH
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse

OpenSSH Server Configuration for Windows 10 1809 and Windows Server 2019
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration

Here's also a third party guide:
How to set up an SFTP server in Windows using OpenSSH



(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)


Best regards,
Leon

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you. Yes, I did see those articles prior to posting. But since url was mentioned, that confused a bit. So, it is just a matter of spinning the openssh with necessary firewall rule and then using a ftp client (winscp) to connect to the openssh?

I am also trying to find out how to best secure it. I plan to have a folder where the files will be pushed/pulled from.

0 Votes 0 ·

So, it is just a matter of spinning the openssh with necessary firewall rule and then using a ftp client (winscp) to connect to the openssh?

Yes that's correct.


I am also trying to find out how to best secure it. I plan to have a folder where the files will be pushed/pulled from.

This is how it's normally done, I'd also recommend separate folders for downloaded & uploaded files.

1 Vote 1 ·

There will be one folder where our internal application will push the file to. The third party app will pull it from that location. Thank you much for confirming. I will update once it is set up and mark it answered (might have a questions later as well).

0 Votes 0 ·
Show more comments
AskAlways-3728 avatar image
0 Votes"
AskAlways-3728 answered AskAlways-3728 edited

Used the two articles to create sftp and restrict access. There was another blog that I used to configure user access, that is, restrict user to one root folder. Also, #Match Group Administrators had to be commented.

fyi the sftp url also works in that the browser needs a sftp client extension. If one has a "test" folder and a "myTest.txt" inside that folder then the sftp url to that file will be (at least that seemed to work in my case)

sftp://sftpserver.mydomain.com//test/myTest.txt

Thanks.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.