pult / libssh2_delphi

delphi pascal libssh2 ssh2 sftp libssh2.dll
81 stars 33 forks source link

SSH Tunnel #13

Open marcianobandeira opened 8 months ago

marcianobandeira commented 8 months ago

Is it possible to create an SSH tunnel, that is, pass parameters when connecting to the server? For example, via the command line I can map a local port pointing to the server:

ssh -L 5454:localhost:5454 -L 6379:localhost:6379 user@host

in this example, I am mapping my local ports, to ports on the linux server Thanks

pult commented 8 months ago

Only api here, no examples. You can find examples:

google: libssh2 tunnel. For example, this "C" example https://github.com/libssh2/libssh2/blob/master/example/tcpip-forward.c https://github.com/marianafranco/libssh2-tunnel-example/blob/master/libssh2-tunnel-example.c

google: libssh2 tunnel delphi Delphi ssh library wrapping libssh2: https://github.com/pyscripter/Ssh-Pascal/blob/master/Source/SshTunnel.pas