PDA

View Full Version : Synapse SSH simple connection



lordzero
24-05-2008, 01:47 PM
Hello

I'm trying implement a simple SSH connection...

I want do a connection with my delphi application on a remote SSH server...

I found this demo on internet about forwarding application:

http://www.amsoftwaredesign.com/downloads/synapse_ssh_test.zip

This demo use Synapse library that have SSH support on delphi for free..

original sample thread:
http://coding.derkeiler.com/Archive/Delphi/borland.public.delphi.thirdpartytools.general/2005-12/msg00156.html


Can somebody help?

I just want a simple client sample source code to understand how to connect on a machine direct... without redirect ports...

Greets

lordzero
28-05-2008, 09:13 PM
from the mailing list of official website:



program ssh;
uses
OpenSSL, // fpc extra package, Author: Lukas Gebauer
tlntsend, ssl_openssl, ssl_openssl_lib, ssl_cryptlib; // synapse units, cryptlib requires version 3.3.2 of Peter Gutmann's cryptlib.pas and cl32.dll
var
c : TTelnetSend;
begin
c := TTelnetSend.Create;
c.TargetHost := 'HOSTNAME-OR-IP';
c.UserName := 'USERNAME';
c.Password := 'PASSWORD';
if c.SSHLogin then
writeln('c.SSHLogin = true, connected')
else
writeln('c.SSHLogin = false, could not connect');
c.Logout;
c.Free;
end.


anyway thanks :P