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

New Post: sFTP with privateKeyFile and password in ftp connection

$
0
0
You should use the SftpClient constructor that takes a ConnectionInfo:
var authenticationMethods =
    {
        new PasswordAuthenticationMethod("user", "pwd"),
        new PrivateKeyAuthenticationMethod("user", "key.pem")
    };

using (var client = new SftpClient(new ConnectionInfo("host", 22, "user", authenticationMethods)))
{
    ...
}
Cheers,
Gert

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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