如何使用WinSCP(SFTP)将文件上传到Azure存储? [英] How to upload a file to Azure Storage with WinSCP (SFTP)?

查看:183
本文介绍了如何使用WinSCP(SFTP)将文件上传到Azure存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用WinSCP的C#服务,该服务可靠地将文件上传到任何SFTP服务器.我想使用它连接到MS Azure存储并使用相同的SFTP协议上传文件. 请注意,我不打算使用任何其他协议(即FTP,FTPS,HTTPS等),也不希望从Azure存储中提取SFTP文件. 有很多示例,这些示例说明了从Azure存储中SFTP [输出]时如何使用WinSCP,但是没有一个示例涉及如何SFTP [输入].

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].

我已经搜索了Stack Overflow知识库,Azure帮助文档( https://azure.microsoft.com/zh-cn/documentation/articles/storage-dotnet-how-to-use-blobs/)以及WinSCP文档( http://winscp.net/eng/docs/guide_microsoft_azure_webjob_sftp 等).

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.

更新:2016年1月29日 所以...据目前为止我了解,不可能使用SFTP协议将文件上传到Azure存储. MS Azure不支持此功能.有人可以帮我确认一下吗?

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?

更新:2016-02-01 此处类似的Q/A(使用sFTP服务使Azure存储blob消失 )未回答我的问题,因为: a)所有答案都暗示了使用VM或其他替代品的理论解决方法 b)它没有为我的问题提供明确的答案

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

这应该不难回答.如果不支持SFTP,则答案为: "Azure不支持SFTP" .如果支持SFTP协议,请提供有关设置,方法和/或C#示例的更多详细信息.我的问题是有明确定义的,因此具有相同需求的其他人可以快速找到答案,而不会浪费时间.

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.

推荐答案

从您的评论看来,您已经获得了SFTP访问信息.因此,您的问题不是专门针对Azure.您所需要的只是如何上传到SFTP.为此,请使用WinSCP站点上的任何SFTP上传示例.例如,一个非常基本的示例上传单个文件.只需使用客户端提供的访问信息即可.

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.

尽管如此,但我不确定是否存在对Azure存储的SFTP访问.但这是您必须与客户讨论的事情.他们坚持使用SFTP.

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.

有关对Azure存储进行远程访问的讨论,请参见例如:

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

  • Get started with Azure File storage on Windows
  • Facading Azure storage blob with sFTP service

这些都没有提及任何SFTP.实际上,Azure服务通常不支持SFTP. SFTP通常是* nix的东西. Windows上运行的Azure服务. Windows中没有SFTP(). Windows支持FTPS.但是Azure商店似乎也不支持.

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.

也许有些误解.可能不是Azure存储,可能只是用于存储文件的Azure Linux盒子.或者,它们的意思是FTPS,而不是SFTP.他们可能拥有带有FTPS服务器的Azure VM,可以访问Azure存储.

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.

这篇关于如何使用WinSCP(SFTP)将文件上传到Azure存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆