Hi,
string userName = "user1";
PrivateKeyConnectionInfo conInfo = new PrivateKeyConnectionInfo( host, userName, SSHKey );
using ( ScpClient scp = new ScpClient( conInfo ) )
{
I am using private key to connect to Unix host.
PrivateKeyFile SSHKey = new PrivateKeyFile( @"C:\x_dsa.txt" );string userName = "user1";
PrivateKeyConnectionInfo conInfo = new PrivateKeyConnectionInfo( host, userName, SSHKey );
using ( ScpClient scp = new ScpClient( conInfo ) )
{
scp.Connect();
but it always failes with error "Permission denied (publickey)"