Hola...
Estoy tratando de realizar una conexión a través de sftp, he encontrado documentación referente siempre a los componentes Indy, he tratado de reproducir el código siguiendo las conexiones pero siempre me da error de time out. El código que utilizo es el siguiente:
Código Delphi
[-]Var
lFtp: TIdFTP;
lHandler: TIdSSLIOHandlerSocketOpenSSL;
Begin
lFtp := TIdFTP.Create(Nil);
lHandler := TIdSSLIOHandlerSocketOpenSSL.Create(Nil);
Try
lHandler.SSLOptions.Mode := sslmClient;
lHandler.SSLOptions.CertFile := '';
lHandler.SSLOptions.KeyFile := '';
lHandler.SSLOptions.RootCertFile := '';
lHandler.SSLOptions.Method := sslvSSLv3;
lHandler.SSLOptions.VerifyDepth := 0;
lFtp.IOHandler := lHandler;
lFtp.Host := '192.168.1.12';
lFtp.Port := StrToInt('22');
lFtp.Username := 'usuario';
lFtp.Password := 'clave';
lFtp.UseTLS := utUseExplicitTLS;
lFtp.ReadTimeout := 3000;
lFtp.AUTHCmd := tAuto;
Try
lFtp.Connect;
Except
On E: Exception Do
Begin
mmoStatus.Lines.Add('Exception: ' + E.Message);
Exit;
End;
End;
If lFtp.UsingSFTP Then
mmoStatus.Lines.Add('USINGSFTP=TRUE')
Else
mmoStatus.Lines.Add('USINGSFTP=FALSE');
Finally
FreeAndNil(lFtp);
FreeAndNil(lHandler);
End;
End;
alguna idea???