function Connect()


The Connect() function tries to connect and authenticate to the remote service.
If such connection and authentication are successful, this function returns true, otherwise it returns false.


Example:

{
 var scli = new SftpClient();
 scli.Host = 'your.sftpserver.com:22';
 scli.User = 'someusername';
 scli.KeyFile = './my_id.rsa';
 if (scli.Connect()) {
  // perform your file transfers...
  // ...
  // ...
  scli.Close();
 }
 scli = null
}