NET SFTP Library
Connect() Method
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP Class : Connect() Method
Open the FTP Server connection explicitly and leave it open until explicitly closed.
Syntax
'Declaration
 
Public Function Connect() As System.String
'Usage
 
Dim instance As SFTP
Dim value As System.String
 
value = instance.Connect()
public System.string Connect()
public function Connect(): System.String; 
public function Connect() : System.String;
public: System.string* Connect(); 
public:
System.String^ Connect(); 
Example
SFTP sftp = new SFTP(); //Trial Mode            
            //SFTP sftp = new SFTP("place user name here", "place license key here");
             
            // set the name of the SSH server( its URL )
            sftp.HostAddress = "some.sftp.server.com"; // replace with your SFTP server
            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");
             
            ' set the name of the SSH server( its URL )
            sftp.HostAddress = "some.sftp.server.com" ' replace with your SFTP server
            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