简体   繁体   English

Ssh.Net中的某些命令不起作用

[英]Certain commands in Ssh.Net don't work

I'm new here. 我是新来的。 I've basically run out of options so i'm hoping somebody can point me in some sort of direction to a page or code suggestions. 我基本上用完了所有选项,所以我希望有人可以向我指出某种指向页面或代码建议的方向。 I'm trying to run scripts on our shell (PuTTY). 我正在尝试在我们的Shell(PuTTY)上运行脚本。 I can do everything except the unzip and stream commands, is there a certain way to set this up, or are they just not recognized by Ssh.Net? 除了unzip和stream命令,我可以做所有事情,是否可以通过某种方式进行设置,或者Ssh.Net不能识别它们? I need to extract a file from our zipFolder. 我需要从zipFolder中提取文件。

I use the SshClient.RunCommand() to run unzip " + <zipFilePath> + " " + <file> but nothing happens. 我使用SshClient.RunCommand()运行unzip " + <zipFilePath> + " " + <file>但是没有任何反应。

If anybody can help me out, that'd be amazing. 如果有人可以帮助我,那就太好了。 I have connection set up fine, i can create files, echo into them, copy. 我的连接设置良好,我可以创建文件,将它们回显,复制。 It's just the important commands I need. 这只是我需要的重要命令。 Thank you 谢谢

Mostly putty shell script by default run in home directory of logged in user. 默认情况下,大多数putty shell脚本在登录用户的主目录中运行。 So you need to be confirm that zip file exists there. 因此,您需要确认那里存在zip文件。 And also the logged in user does have the rights permission. 而且,已登录的用户确实具有权限许可。

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

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