.NET类远程Linux上通过SSH执行?NET、Linux、SSH

2023-09-03 15:06:08 作者:哼唱爱情。

我不知道从哪里开始使用单纯地执行远程脚本并返回输出到Web表单。在这种情况下,我们有一个执行一些第三方工具,应用程序服务器。我们想写一个接口,用于我们的电力用户,使他们能够检查各种进程的状态,并执行一些支持有可用的第三方管理工具。问题是,我们只能通过腻子通过SSH连接到这个Linux操作系统(红帽)的机器。我看着PSEXEC,但它似乎没有处理SSH。我想避免任何大的安全漏洞,如果可能的话,但是这是为了在封闭的网络用户的数量有限。 感谢您的任何帮助入门!

I'm not sure where to get started with simply executing a remote script and returning the output to a web form. In this case we have an application server that executes some 3rd party tools. We'd like to write an interface for our power users that allow them to check the status of various processes and also execute some of the 3rd party admin tools that support has available. The issue is that we only connect to this Linux (RedHat) machine via Putty over SSH. I looked into PsExec but it doesn't seem to handle SSH. I'd like to avoid any large security holes, if possible, but this is intended to be a limited number of users in a closed network. Thanks for any assistance getting started!

推荐答案

有几种选择做SSH的.NET - 尽管你需要一个库,既然没有什么是内置的:

There are several options to do SSH in .NET - although you need a library for that since nothing is built-in:

HTTP://www.$c$cproject.com/KB/ IP / sharpssh.aspx http://www.rebex.net/ssh-shell.net/(商业) https://www.eldos.com/sbb/net-ssh.php (商业) HTTP://sshnet.$c$cplex.com/ http://granados.sourceforge.net/ http://www.codeproject.com/KB/IP/sharpssh.aspx http://www.rebex.net/ssh-shell.net/ (commercial) https://www.eldos.com/sbb/net-ssh.php (commercial) http://sshnet.codeplex.com/ http://granados.sourceforge.net/