Re: SFTP and SSH

Giganews Newsgroups
Subject: Re: SFTP and SSH
Posted by:  us…@domain.invalid
Date: Mon, 09 Jul 2007

I would like to write also one sftp client but I dont know how to
configure the TIdSSLIOHandlerSocketOpenSSL. When I try to connect I
receive the message SSL is not avaible on this server.

Here is a part of my code:

type
  TForm1 = class(TForm)
    IdFTP1: TIdFTP;
    IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL;
    SpeedButton1: TSpeedButton;
    OpenDialog1: TOpenDialog;
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
  IdFTP1.Connect;
  if idftp1.connected then begin
    if OpenDialog1.Execute() then
        IdFTP1.Put(OpenDialog1.FileName);
    IdFTP1.Disconnect;
  end;
end;

The dfm :

object IdFTP1: TIdFTP
    IOHandler = IdSSLIOHandlerSocketOpenSSL1
    AutoLogin = True
    Passive = True
    DataPortProtection = ftpdpsPrivate
    AUTHCmd = tAuthSSL
    UseExtensionDataPort = True
    ProxySettings.ProxyType = fpcmNone
    ProxySettings.Port = 0
    UseTLS = utUseRequireTLS
  end
  object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL
    MaxLineAction = maException
    Port = 21
    DefaultPort = 0
    ReadTimeout = 60000
    SSLOptions.Method = sslvTLSv1
    SSLOptions.Mode = sslmServer
    SSLOptions.VerifyMode = []
    SSLOptions.VerifyDepth = 0

  end

junior wrote:
> Hi,
>
>  I would like to use Indy on SFTP / SSH .. where to find an example ? ..
>
> regards,
> Jr

Replies

In response to

SFTP and SSH posted by junior on Fri, 25 May 2007