Well in theory it is possible to automate everything the question is which approach will work.
So as simple as executing the command it will not work since it doesnt keep session between command execution.
So if you cannot create a script on the server that will do the job for you or provide everything you need to do in one command line then you can try different approiach.
I created this as an option for future development and to see since I was curious what will happend but I think it might help in your case.
I thought once of a way to provide an input stream and to use this input stream as an input for a shell. Mostly it works but I didnt take it any further.
using (var ssh = new SshClient(connectionInfo))
var input = new MemoryStream(Encoding.ASCII.GetBytes("sudo ufw status\r\nPassword\r\n"));
//var input = Console.OpenStandardInput();
var shell = ssh.CreateShell(input, Console.Out, Console.Out, "xterm", 80, 24, 800, 600, "");
shell.Stopped += delegate(object sender, EventArgs e)
Thread.Sleep(1000 * 1000);
This is how I use it in my case.
You can replace inputs and then you will have simple telnet client.
Stopped event will be fired when shell is finished, usually when you call "exit" command.
Let me know if you have any more question or have some ideas on how and where to take this Shell implementation further.
Also, you would need to get latest version that I just checked in since I had an error when printing out results back.
Hope it helps,