How to su with SSH.Net?
问题 How can I properly su into root using SSH.Net? This question is similar to: this and this. I couldn't get any of the solutions to the answers to work for me. Here is my code: using (var client = new SshClient("ip", "username", "password")) { client.Connect(); if (client.IsConnected) { var shell = client.CreateShellStream("xterm", 80, 24, 800, 600, 1024); var reader = new StreamReader(shell); var writer = new StreamWriter(shell); writer.AutoFlush = true; writer.Write("su - root" + "\n"); var