Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Unable to CD when connecting through SSH

$
0
0
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.
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();
}

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>