It is really annoying that there is no such topic about 'switching user with ssh.net'
Well, i tried it like below but it didn't work.
I have no idea about what can i do more. Can you show me?
SshClient cSSH = new SshClient("172.31.60.10", 22, "testuser", "oracle");
cSSH.Connect();
var command = cSSH.RunCommand("su - oracle");
command.Execute();
command = cSSH.RunCommand("oracle");
command.Execute();
command = cSSH.RunCommand("touch test");
command.Execute();
cSSH.Disconnect();
cSSH.Dispose();