简体   繁体   English

如何远程获取 Windows 机器上的文件的校验和?

[英]How do I remotely get a checksum for a file on a Windows machine?

I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content.我正在尝试使用自动发现工具检查远程 J2EE 应用程序服务器中的 JAR 文件何时更改了内容。 Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs.目前系统使用WMI下载整个JAR到本地校验,对于大型JARs来说速度较慢。

For UNIXy servers (and Windows servers with Cygwin), I can just log in over SSH and run md5sum foo.jar .对于 UNIXy 服务器(以及带有 Cygwin 的 Windows 服务器),我可以通过 SSH 登录并运行md5sum foo.jar Ideally, I'd like to avoid installing extra software on the remote servers (there may be thousands), so is there a good way to do this on vanilla Windows servers?理想情况下,我想避免在远程服务器上安装额外的软件(可能有数千个),那么在普通 Windows 服务器上是否有这样做的好方法?

You could try the Sysinternals PSExec tool .你可以试试Sysinternals PSExec 工具 You would need a checksum utility available on the remote machine.您需要远程机器上可用的校验和实用程序。 Unfortunately since they became part of Microsoft they don't make any source code available.不幸的是,自从他们成为微软的一部分后,他们没有提供任何源代码。

Alternatively, you could install the Cygwin SSH daemon on the remote machines and use ssh but that's a bit more involved.或者,您可以在远程计算机上安装 Cygwin SSH 守护程序并使用 ssh 但这有点复杂。

Microsoft has a free checksum tool you could run with PSExec above. Microsoft 有一个免费的校验和工具,您可以使用上面的 PSExec 运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM