ShellHelp shell = new ShellHelp();
            //连接路由器成功 
            if (shell.OpenShell("172.169.81.1", "root", "dnkty218"))            {                shell.Shell("ena");//进入配置模式命令
                shell.Shell("dnkty109");//输入进入配置模式的密码   问题就出在这里,好像无法将密码输入,回显的也不提示密码错误,就好                                            像没有输入一样,其它都命令都没有问题
                string info = shell.GetAllString();//获取返回结果 
                Console.WriteLine(info);
                shell.Close();//关闭连接 
            }
            Console.ReadLine();
    public bool OpenShell(string host, string username, string pwd)
    {
        try
        {
            ////Redirect standard I/O to the SSH channel 
            inputstream = new Tamir.SharpSsh.SshStream(host, username, pwd);
            ///我手动加进去的方法。。为了读取输出信息 
            inputstream.set_OutputStream(outputstream);
            return inputstream != null;
        }
        catch { throw; }
    }问题就出在再次输入配置模式密码的地方,其它命令都没有问题,下面是送入命令的代码
public void Write(String data)
{            //Encoding.ASCII.GetBytes(password);
            data += "\r";
            //Write( Encoding.Default.GetBytes( data ) );            Write(Encoding.ASCII.GetBytes(data));
            Flush();
}