HEY ALL!!!!
I still didn't figure out how i can open a ssh tunnel using a system call within my c code...
can anyone give me a hint in this issue?!?
Thanks a lot in advance
Breno Kastrup
HEY ALL!!!!
I still didn't figure out how i can open a ssh tunnel using a system call within my c code...
can anyone give me a hint in this issue?!?
Thanks a lot in advance
Breno Kastrup
man ssh
Code:NAME ssh - OpenSSH SSH client (remote login program) SYNOPSIS ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec] [-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [user@]hostname [command] DESCRIPTION ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communica- tions between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. ssh connects and logs into the specified hostname (with optional user name). The user must prove his/her identity to the remote machine using one of several methods depending on the protocol ver- sion used.
salem,
thanks for the try, but this still didn't help much..
Is this what you wanted? system() sends a command to the shell.Code:#include <stdlib.h> ... system ("ssh [see above man page]");
Or with slightly more work you could implement it without the hated system() function.
Check out libssh
Hi all
Never use system() since you have a fork()-exec() choice in UNIX world!
Cool eerok, that's what i meant in the first place.....
but fnoyan said not to use system..... why is that??
so i should use the libssh valis pointed out instead?!
I'll take a look at it and tell you guys how i'm going...
Thanks a lot
Breno
Hi
Reading the below PDF will help you I think...
http://www.advancedlinuxprogramming....-processes.pdf