4

theI have a C# service using WinSCP which reliably uploads files to any SFTP server. I'd like to use it to connect to MS Azure Storage and upload files there using the same SFTP protocol. Please note I am not looking to use any other protocol (i.e.: FTP, FTPS, HTTPS, etc.) as well as I am not looking to SFTP files [out] of the Azure Storage. There are plenty of examples of how to use WinSCP when SFTP [out] from Azure Storage but none of them covers how to SFTP [in].

I have searched Stack Overflow knowledge base, Azure Help Documentation (https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/) as well as WinSCP docs (http://winscp.net/eng/docs/guide_microsoft_azure_webjob_sftp, etc.).

Any help appreciated. Thanks.

UPDATE: 2016-01-29 So... from what I understand so far, it is not possible to upload files to Azure Storage using SFTP protocol. MS Azure does not support this feature. Can anybody confirm that for me please?

UPDATE: 2016-02-01 The similar Q/A here (Facading Azure storage blob with sFTP service) does not answer my question because: a) all answers are suggesting a theoretical workarounds using VM or other substitutes b) it does not provide clear answer to my question

This should not be so difficult to answer. If the SFTP is not supported then the answer is: "SFTP is not supported in Azure". If the SFTP protocol is supported, then please provide more details about the settings, methods, and/or C# example. My question is clearly defined on purpose so others with the same need can quickly find the answer without wasting their time.

Community
  • 1
  • 1
Milan
  • 2,893
  • 1
  • 29
  • 43
  • 1
    Have you looked at this [article from WinSCP](http://winscp.net/eng/docs/guide_microsoft_azure_webjob_sftp)? – vmachan Jan 28 '16 at 01:06
  • I did and from what I understand it deals with the SFTP out scenario. They have an example called: "An example C# code that backs up the WebSite to a remote SFTP server". I need to import the file into the Azure Storage not out. Thx. – Milan Jan 28 '16 at 01:12
  • Have you looked at this [link](http://winscp.net/eng/docs/library_examples) on that page as well? It provides `get` and `put` examples so you could use either depending on where you are running the job.. – vmachan Jan 28 '16 at 01:28
  • All the examples in the guide [SFTP/FTPS file transfers in Microsoft Azure WebJob](http://winscp.net/eng/docs/guide_microsoft_azure_webjob_sftp) shows upload. Exactly what you look for. – Martin Prikryl Jan 28 '16 at 07:08
  • @MartinPrikryl - Could you provide me with the section of the WinSCP page you are referring to which shows SFTP upload to Azure Storage please. – Milan Jan 29 '16 at 18:31
  • @vmachan - yes, I have. Which get/put examples are you referring to? Are you sure these relate to the SFTP upload to Azure Storage and not a regular SFTP server ? – Milan Jan 29 '16 at 18:35
  • @MartinPrikryl - (...mimochodem, SFTP a FTPS jsou dva naprosto ruzne protocoly a ja musim pouzit jen SFTP, diky.) – Milan Jan 29 '16 at 18:39
  • @MartinPrikryl - but this clearly states: "...An example script (script.txt) that backs up the WebSite to a remote SFTP server: ...". What am I missing ? It says "REMOTE" server. Are you suggesting that Azure Storage can be run as "REMOTE SFTP SERVER" I can connect to ? – Milan Jan 29 '16 at 19:38
  • Sorry, I take it back. You are right. The example shows upload, but of course not to the Azure Storage, but to another SFTP server. There's no SFTP on Azure Storage. Why do you insist on SFTP? – Martin Prikryl Jan 29 '16 at 19:44
  • @MartinPrikryl - client's security policy which I am unable to change. I was given port 22 to use to transfer the data to Azure Storage, no other port can be used. – Milan Jan 29 '16 at 23:26
  • **See also:** https://stackoverflow.com/questions/27004376/copy-file-from-remote-server-using-sftp-straight-to-azure-blob-storage – dreftymac Oct 08 '19 at 21:45

1 Answers1

-1

From your comments, it seems that you were already given the SFTP access information. As such, your question is not about Azure specifically. All you ask for is how to upload to an SFTP. For that use any SFTP upload example on the WinSCP site. For instance, the very basic example Uploading a single file. Just use the access information you were given by the client.


Though again, I'm not sure there's an SFTP access to Azure Storage. But that's something you have to discuss with the client. They insist on the SFTP.

For discussion about remote access to Azure Storage, see for example:

None of these mention any SFTP. Actually Azure services do not support SFTP in general. SFTP is *nix thing generally. Azure services run of Windows. There's no SFTP in Windows (yet). Windows supports an FTPS. But Azure Store does not seem to support that either.

Maybe there's some misunderstanding. Maybe it's not the Azure Storage, maybe it's just an Azure Linux box used to store files. Or they mean the FTPS, not the SFTP. They might have an Azure VM with an FTPS server to access the Azure Storage.

Martin Prikryl
  • 147,050
  • 42
  • 335
  • 704
  • p. - Thanks for the response. I cannot accept it as is since it is not accurate. If you remove the 1st paragraph (From your comments...) and the last paragraph (Maybe...) I will accept as answer. Thank you. – Milan Feb 01 '16 at 16:22
  • Sorry, but it's as accurate as your question is. I'm still not sure what you actually asked for. So I covered all possibilities. Can you make you question clearer now? – Martin Prikryl Feb 01 '16 at 18:13
  • p. - question re-edited. Btw my comments do not suggest anything you wrote in the first and the last paragraph. Only the middle part seems correct. Thx. – Milan Feb 01 '16 at 18:25
  • What about *"I was given port 22 to use to transfer the data to Azure Storage"*? – Martin Prikryl Feb 01 '16 at 19:34
  • ..that would not be the whole truth, I was given C# WinSCP service, port 22 and SFTP protocol requirements. If port 22 would be the only requirement it would give me more options how to get the data out through port 22 without using SFTP. – Milan Feb 01 '16 at 19:41
  • No, I read that post and that does not answer my question. But, do whatever you want. – Milan Feb 01 '16 at 20:14