Cannot make SshClient stop echo-ing

May 27, 2013 at 3:20 PM
Edited May 27, 2013 at 3:21 PM

When I setup a connection to an SSH Server I see the commands I send later echoed back to me. How can I stop getting my commands echo'ed back to me?

I use the following code, with variations....
        AuthenticationMethod am = new PasswordAuthenticationMethod(Credentials.UserName, Credentials.Password);
        ConnectionInfo connectionInfo = new ConnectionInfo( RemoteHostIP, Credentials.UserName, new AuthenticationMethod[] { am });

        _sshClient = new SshClient(connectionInfo);

        Dictionary<TerminalModes, uint> terminalModes = new Dictionary<TerminalModes,uint>();
        //terminalModes.Add(TerminalModes.ECHO, 0);
        //terminalModes.Add(TerminalModes.ONOCR, 1);
        _sshStream = _sshClient.CreateShellStream("xterm", 0, 0, 0, 0, 1024, null);//terminalModes);
I tried several terminalModes but without succes.

Please advise...