给定管理员凭据,在远程 Windows 计算机上启动命令
我在 Amazon EC2(Amazon 的云计算平台,在云中提供虚拟机)上有一个 Windows Server 2008 实例。它有一个外部IP,我在盒子上有一个管理员帐户。我想远程“引导”此实例,即我想运行命令来下载、安装和配置其上的应用程序,所有这些都无需登录一次。
我已经弄清楚如何使用 WMI 对远程加入域的计算机执行此操作。只要远程计算机是域的一部分,我什至可以使用 psexec 来获取我想要的东西。但是,我无法对 EC2 上的远程计算机执行此操作。以下是一些具体限制:
1) 远程计算机不属于我的域,因此没有 Kerberos 2)远程计算机没有我信任的证书,反之亦然,
我确信我遇到了一些身份验证/信任限制。考虑到我有管理员权限,有什么方法可以在远程运行单个命令吗?我并不局限于使用 WMI,但我确实需要以某种方式运行命令。感觉这个问题应该已经解决了。
I have a Windows Server 2008 instance on Amazon EC2 (Amazon's cloud compute platform, which provides VMs in the cloud). It has an external IP, and I have an admin account on the box. I would like to 'bootstrap' this instance remotely i.e. I want to run commands to download, install and configure apps on it, all without having to log on even once.
I have figured out how to do this to a remote, domain-joined computer using WMI. I can even use psexec to get what I want, as long as the remote computer is part of the domain. However, I have NOT been able to do for a remote computer on EC2. Here are some specific restrictions:
1) The remote computer is not part of my domain, hence no Kerberos
2) The remote computer does not have a cert I trust, or vice versa
I am sure I am running into to some auth/trust restriction. Is there any way I can run a single command on the remote, given that I have admin privileges? I'm not tied down to using WMI, but I do need to run a command somehow. Feels like this should be a solved problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也在 EC2 上运行 Windows,你说得对,这个问题已经解决了。恕我直言,云管理提供商目前为 Windows 提供的最佳解决方案是 RightScale 最近为 Windows 添加的解决方案支持。
我使用 RightScale 的免费开发者帐户,它们使您能够准确地执行上面提到的操作。这是传统 Windows 管理的一个微小转变。它们具有厨师食谱(或脚本)的概念,由实例下载并在启动时运行。这些是可用于配置/安装软件的脚本。它实际上是一个非常引人注目的工具并且非常强大。如果您不想使用任何云管理提供商,例如 Rightscale 或 Scalr.net 或 Kaavo 等,我建议您运行自己的 Chef 服务器或使用类似的工具(Puppet、CfEngine 等),并使用它来配置和部署您的云实例。 Chef 的最新版本支持 Windows客户。
如果您只是想快速从笔记本电脑/台式机向云实例远程发出命令,那么您只需安装 Powershell 2.0 附带的 Windows Management Framework 即可。使用 Powershell 2.0,您可以发出远程命令(“Invoke-Command”,很像 ssh)并让它在实例上执行您想要的任何操作。无需 Windows 域,身份验证非常简单。您只需在桌面上使用与您的实例相同的用户名/密码创建一个管理员用户,Invoke-Command 就会起作用。
I'm running Windows on EC2 as well and you're right this problem has been solved. The best solution being offered by cloud management providers currently for Windows, IMHO, is RightScale's recent addition for Windows support.
I use RightScale's FREE developer account and they enable you to do exactly what you're referring to above. It's a slight shift in tradtional Windows management. They have the concept of Chef Recipes (or scripts) that are downloaded by the instances and run on boot time. These are script that you can use to confgure/install software. It's actually a very compelling tool and surprisingly powerful. If you do not wish to use any cloud management providers like Rightscale or Scalr.net or Kaavo etc, I'd suggest running your own Chef server or use similar tools (Puppet, CfEngine etc), and use that to configure and deploy your cloud instances. Chef's latest release supports Windows clients.
If you're simply looking for a quick win to issue commands remotely from your laptop/desktop to your cloud instance, then the you can simply install Windows Management Framework which comes with Powershell 2.0. Using Powershell 2.0, you can issue remote commands ("Invoke-Command", much like ssh) and have it execute pretty much whatever you want on your instance. Authentication is quite simple w/o a Windows domain. You simply have to create an admin user on your desktop with the same username/password as your instance and Invoke-Command will work.