I am connecting to a windows computer to an ubuntu comupter using SSH and have established connection. However, I'm unable to perform commands like cd.
I am able to perform ls and ip addr ls.
I have copied the private key file generated from the ubuntu onto windows and placed it in the code as shown below.
I am able to perform ls and ip addr ls.
I have copied the private key file generated from the ubuntu onto windows and placed it in the code as shown below.
var keyFile = new PrivateKeyFile(File.OpenRead(@"filepath"));
try
{
//connect here
var con = new ConnectionInfo(addr, user, new PasswordAuthenticationMethod(user, passwd), new PrivateKeyAuthenticationMethod(user, keyFile));
//client = new SshClient(addr, user, passwd);
client = new SshClient(con);
client.Connect();
}