打开cmd窗口并使用批处理文件传入硬编码值 [英] open a cmd window and pass in hardcoded values using a batch file

查看:91
本文介绍了打开cmd窗口并使用批处理文件传入硬编码值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何打开cmd窗口并使用批处理文件传递硬编码值。实际上我们有一个带有用户名和密码的Unix服务器。登录到该主机后,通常会运行一些常用命令。



如何通过C#使用命令来运行这些...如果有任何内置库或我们如何在运行时自动发出命令。

How can I open a cmd window and pass in hardcoded values using a batch file.Actually we have a Unix Server with user name and password.after login to this host,there are some common commands that usually running.

How i can run these usually using commands through C# ..is there any built in library or how we can give commands at run time automatically.

推荐答案

对于Linux / BSD - 使用SSH客户端库在目标主机上打开远程shell。



示例:



sharpSsh - 用于.NET的安全Shell(SSH)库 [ ^ ]



http://sshnet.codeplex.com/ [ ^ ]
For Linux / BSD - use an SSH client library to open a remote shell on the target host.

Examples:

sharpSsh - A Secure Shell (SSH) library for .NET[^]

http://sshnet.codeplex.com/[^]


这篇关于打开cmd窗口并使用批处理文件传入硬编码值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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