Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Help with using Renci SSH tool

$
0
0
Thats because each Command is executed in a new Shell.
In your case I think the easiest way would be to combine your commands with "&&" or ";".

e.g.
 cmd = sshClient.CreateCommand("cd /nfs/iil/proj && pwd");
or
 cmd = sshClient.CreateCommand("cd /nfs/iil/proj; pwd")
"&&" executes the following command just if the previous command succeeded
";" always executes the following commands

http://www.livefirelabs.com/unix_tip_trick_shell_script/june_2003/06232003.htm

Another approach would be to use CreateShell() to write/read and use the input/output.

Viewing all articles
Browse latest Browse all 1729

Trending Articles