NET SFTP Library
SshKeyFile Property
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP Class : SshKeyFile Property
A private key file for an SSH connection in OpenSSH or Putty format
Syntax
'Declaration
 
Public Property SshKeyFile As System.String
'Usage
 
Dim instance As SFTP
Dim value As System.String
 
instance.SshKeyFile = value
 
value = instance.SshKeyFile
public System.string SshKeyFile {get; set;}
public read-write property SshKeyFile: System.String; 
public function get,set SshKeyFile : System.String
public: __property System.string* get_SshKeyFile();
public: __property void set_SshKeyFile( 
   System.string* value
);
public:
property System.String^ SshKeyFile {
   System.String^ get();
   void set (    System.String^ value);
}
Example
SFTP sftp = new SFTP(); //Trial Mode            
//SFTP sftp = new SFTP("place user name here", "place license key here");
sftp.SshKeyFile = @"c:\mykey";
sftp.SshPassphrase = "qazzaq";
 
// set the name of the SFTP server( its URL )
sftp.HostAddress = "some.sftp.server.com";
sftp.UserName = "anonymous"; // replace with your user name
sftp.Password = "user@mail.com"; // replace with your password
        
sftp.Connect();
Dim sftp As SFTP = New SFTP() 'Trial Mode
'Dim sftp As SFTP = New SFTP("place user name here", "place license key here")
sftp.SshKeyFile = "c:\mykey"
sftp.SshPassphrase = "qazzaq"
 
' set the name of the SFTP server( its URL )
sftp.HostAddress = "some.sftp.server.com"
sftp.UserName = "anonymous" ' replace with your user name
sftp.Password = "user@mail.com" ' replace with your password
 
sftp.Connect()
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SFTP Class
SFTP Members