来自asp.net的Shell脚本 [英] Shell script from asp.net
问题描述
我正在使用Tahir Gal dll与服务器建立sftp连接,然后尝试执行shell脚本
I am using Tahir Gal dll''s for making an sftp connection to server and then tried to execute shell script
ssh.Prompt = "$";
string commnd = "ls";
//Remove terminal emulation characters
ssh.RemoveTerminalEmulationCharacters = true;
ssh.Write(commnd);
string response = ssh.ReadResponse();
但是我没有从服务器得到正确的响应.假设有10个目录,那么响应中仅列出5个目录.如果我输入另一个ssh.response,则剩下的5个将在其中.所以有人可以帮助我一次获得完整的响应吗?
But i didn''t get the correct response from server. Let''s say there are 10 directories then only 5 are listed in the response. If i put another ssh.response then remaining 5 will be in that. So can anyone help me how to get the full response in one time?
推荐答案
"; 字符串 commnd = " ; // 删除终端仿真字符 ssh.RemoveTerminalEmulationCharacters = true ; ssh.Write(commnd); 字符串 response = ssh.ReadResponse();
"; string commnd = "ls"; //Remove terminal emulation characters ssh.RemoveTerminalEmulationCharacters = true; ssh.Write(commnd); string response = ssh.ReadResponse();
但是我没有从服务器得到正确的响应.假设有10个目录,那么响应中仅列出5个目录.如果我输入另一个ssh.response,则剩下的5个将在其中.有人能帮我一次获得完整的回复吗?
But i didn''t get the correct response from server. Let''s say there are 10 directories then only 5 are listed in the response. If i put another ssh.response then remaining 5 will be in that. So can anyone help me how to get the full response in one time?
这篇关于来自asp.net的Shell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!