在 Windows Azure 平台的云上设置 SSH 服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5619885/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SSH Server setup on Cloud in Windows Azure Platform
提问by Deeps
My client has been using SSH2 protocol for File transfer, recently they have decided to host their application on Cloud, they still want to make use of SSH protocol when transferring files to Cloud storage. Could anyone pls provide information regarding the SSH server setup on Cloud using Windows Azure?
我的客户一直使用 SSH2 协议进行文件传输,最近他们决定将他们的应用程序托管在云上,他们在将文件传输到云存储时仍然希望使用 SSH 协议。任何人都可以提供有关使用 Windows Azure 在云上设置 SSH 服务器的信息吗?
Following are the
以下是
Host the SSH Server on VM Role in Cloud, In this case, will the other Web/Worker roles on the same cloud be ale to access the local storage of the VM role?
Is it possible to host a SSH FTP server using .NET components (Payed/Open Source) in a Worker role in Azure? If yes, please provide information regarding the .NET components available in Market.
If there is no support for SSH in Windows Azure, please let me know other alternatives for Secure File Transfer in Cloud.
在云中的 VM 角色上托管 SSH 服务器,在这种情况下,同一云上的其他 Web/Worker 角色是否可以访问 VM 角色的本地存储?
是否可以在 Azure 的辅助角色中使用 .NET 组件(付费/开源)托管 SSH FTP 服务器?如果是,请提供有关 Market 中可用 .NET 组件的信息。
如果 Windows Azure 中不支持 SSH,请让我知道云中安全文件传输的其他替代方案。
My client used to run their business Unix machines in Closed network from which they performed the file transfer through SFTP to SSH FTP servers of their suppliers.
我的客户曾经在封闭网络中运行他们的商业 Unix 机器,他们通过 SFTP 将文件传输到其供应商的 SSH FTP 服务器。
We are building some applications on Cloud for them which require them to transfer data in the form of files as input to this cloud (web role) application.
我们正在为他们在云上构建一些应用程序,这些应用程序要求他们以文件的形式传输数据作为此云(Web 角色)应用程序的输入。
To transfer files from their Closed network and to make them available on Cloud storage, they insist that they want to still perform this using SSH FTP or using SSH Protocol.
为了从他们的封闭网络传输文件并使它们在云存储上可用,他们坚持认为他们仍然希望使用 SSH FTP 或使用 SSH 协议执行此操作。
We have struck the wall with this requirement, and following is the solutions that we have proposed to them.
我们已经用这个要求碰壁了,以下是我们向他们提出的解决方案。
Please review and provide your comments/suggestions/inputs regarding the best method to perform SSH FTP of files to Cloud Storage.
请查看并提供关于将文件通过 SSH FTP 传输到 Cloud Storage 的最佳方法的评论/建议/输入。
Host SSH Server on VM Role in Cloud, and deploy a Service in their network to transfer files from their network to the cloud. In this case, the files might be saved to the file system in the VM Role, how will we extract the file from the VM role and save it to the shared cloud storage so that other web roles running on cloud can access these files for getting input?
Is it possible to host a SSH FTP server using .NET components (Payed/Open Source) in a Worker role in Azure?
If there is no support for SSH in Windows Azure, please let me know other alternatives for Secure File Transfer using SSH to transfer files from on-premise to cloud storage.
在云中的 VM 角色上托管 SSH 服务器,并在其网络中部署服务以将文件从其网络传输到云。在这种情况下,文件可能会保存到VM Role中的文件系统中,我们如何从VM Role中提取文件并将其保存到共享云存储中,以便运行在云上的其他Web角色可以访问这些文件以获取输入?
是否可以在 Azure 的辅助角色中使用 .NET 组件(付费/开源)托管 SSH FTP 服务器?
如果 Windows Azure 中不支持 SSH,请告诉我使用 SSH 将文件从本地存储传输到云存储的安全文件传输的其他替代方案。
回答by Stuart
Answers on 2 out of 3:
3 中 2 的答案:
Host the SSH Server on VM Role in Cloud, In this case, will the other Web/Worker roles on the same cloud be ale to access the local storage of the VM role?
在云中的 VM 角色上托管 SSH 服务器,在这种情况下,同一云上的其他 Web/Worker 角色是否可以访问 VM 角色的本地存储?
Not the local storage, but you could let them access a shared Cloud Drive - http://blog.maartenballiauw.be/post/2010/02/02/Using-Windows-Azure-Drive-(aka-X-Drive).aspx- note that only one instance can have write access to this drive, but plenty can have read.
不是本地存储,但您可以让他们访问共享的云驱动器 - http://blog.maartenballiauw.be/post/2010/02/02/Using-Windows-Azure-Drive-(aka-X-Drive)。 aspx- 请注意,只有一个实例可以对此驱动器进行写访问,但很多实例都可以读取。
If there is no support for SSH in Windows Azure, please let me know other alternatives for Secure File Transfer in Cloud.
如果 Windows Azure 中不支持 SSH,请让我知道云中安全文件传输的其他替代方案。
The actual upload/download of blobs can be secured with SSL, and access to your stored hosting is via your keys.
可以使用 SSL 保护 Blob 的实际上传/下载,并且可以通过您的密钥访问您存储的主机。
To be honest, I'd recommend looking at using blob storage for this requirement. It depends on how many files/blobs you are looking to store and how often you want to change them, but overall blob storage is pretty useful and usable.
老实说,我建议考虑使用 blob 存储来满足此要求。这取决于您希望存储多少文件/blob 以及您想要更改它们的频率,但整体 blob 存储非常有用和可用。
For an intro to blobs see http://blogs.msdn.com/b/jnak/archive/2010/01/11/walkthrough-windows-azure-blob-storage-nov-2009-and-later.aspx
有关 blob 的介绍,请参阅http://blogs.msdn.com/b/jnak/archive/2010/01/11/walkthrough-windows-azure-blob-storage-nov-2009-and-later.aspx
Is it possible to host a SSH FTP server using .NET components (Payed/Open Source) in a Worker role in Azure? If yes, please provide information regarding the .NET components available in Market.
是否可以在 Azure 的辅助角色中使用 .NET 组件(付费/开源)托管 SSH FTP 服务器?如果是,请提供有关 Market 中可用 .NET 组件的信息。
Possibly - but I've no idea on this - there's lots of hits from http://www.bing.com/search?setmkt=en-GB&q=ssh+ftp+server+c%23
可能 - 但我不知道 - 有很多来自http://www.bing.com/search?setmkt=en-GB&q=ssh+ftp+server+c%23的点击
Edit - also check out this thread - http://forums.iis.net/t/1147827.aspx- you could deploy WinSSHD to a role?
编辑 - 也请查看此线程 - http://forums.iis.net/t/1147827.aspx- 您可以将 WinSSHD 部署到角色吗?
回答by dunnry
Anything is possible of course, but you have some fundamental issues to overcome to have a seamless SSH experience. The biggest issue is not installing SSH - that is cake. The issue you have to face is how to use it across instances when you have a load balancer in front. For a single instance, you should have no issues running an SSH server. All clients will connect easily. Once you have multiple servers running SSH, you get into an issue if the connection to an instance is severed and you reconnect to a different instance. It is nice to run multiple instances for SLA reasons, so this is a common issue.
当然,一切皆有可能,但要获得无缝的 SSH 体验,您需要克服一些基本问题。最大的问题是不安装 SSH - 那是蛋糕。您必须面对的问题是,当您前面有负载均衡器时,如何跨实例使用它。对于单个实例,运行 SSH 服务器应该没有问题。所有客户端都将轻松连接。一旦您有多台服务器运行 SSH,如果与某个实例的连接被切断并重新连接到另一个实例,您就会遇到问题。出于 SLA 的原因运行多个实例很好,所以这是一个常见问题。
Now, RDP (which is a stateful connection) works in Windows Azure because of a socket-based router that forwards traffic to the single instance you wish to communicate with. You might be able to do something similar for SSH.
现在,RDP(一种有状态连接)在 Windows Azure 中工作,因为基于套接字的路由器将流量转发到您希望与之通信的单个实例。您也许可以对 SSH 执行类似的操作。
Beyond the communication issue (assuming you work out SSH with load-balancing), you need to think about persistence. When you FTP something into Windows Azure, unless you are using a drive (XDrive), it is persisted only locally. You would need to think about moving those files off the VM and into permanent storage like blob storage.
除了通信问题(假设您使用负载平衡解决 SSH),您还需要考虑持久性。当您将某些内容通过 FTP 传输到 Windows Azure 时,除非您使用的是驱动器 (XDrive),否则它只会在本地保留。您需要考虑将这些文件从 VM 移到永久存储(如 blob 存储)中。
So, long story short. Yes, you can do it, but it will be some work to do right.
所以,长话短说。是的,你可以做到,但需要做一些正确的工作。
回答by Pat Filoteo
We just posted a how-to SSH on Azure using OpenSSH @ http://blogs.msdn.com/b/mariok/archive/2011/08/09/command-line-access-to-azure-vms-ssh.aspx
我们刚刚发布了使用 OpenSSH 在 Azure 上使用 SSH 的操作方法@ http://blogs.msdn.com/b/mariok/archive/2011/08/09/command-line-access-to-azure-vms-ssh.aspx
The posting includes a sample package. It will run on any role type (Web/Worker/VM) and can be combined with other packages/apps.
该帖子包括一个示例包。它将在任何角色类型(Web/Worker/VM)上运行,并且可以与其他包/应用程序结合使用。
回答by Yves Caron
if he's is not sure using the commandline on the instance he could consider installing webmin it's a great application running from your browser it lets you have control in a windows way on your virtual instance of linux I supposed.
如果他不确定在实例上使用命令行,他可以考虑安装 webmin,这是一个从浏览器运行的很棒的应用程序,它让您可以在我认为的 linux 虚拟实例上以 Windows 方式进行控制。