我想在使用ssh.net连接到另一台计算机时运行批处理脚本
似乎不起作用:
SshCommand command = client.RunCommand("C:\mybatch.bat");
我可以连接并运行shutdown
之类的命令,但我无法运行批处理文件。
我该怎么办?
答案 0 :(得分:0)
尝试从另一个驱动器调用脚本。驱动器C可能需要管理员权限才能访问。
SshCommand command = client.RunCommand("D:\mybatch.bat");