Thank you but it seems that libssh2 is not suitable for me. I need a way to 
transport bash commands between Ubuntu server and FreeBSD and centos servers.
libss2 worked well between linux servers but it gives error when I try to 
connect Ubuntu and FreeBSD

I decided to use rsync to transport data between servers

The principle is very simple - PHP writes ipfw rules in a small file called 
buffer.sh
rsync transports his file in every server and then execute it.

Originally PHP was using libssh2 to establish ssh connections between servers 
and to transport bash commands between servers and to execute them. It worked 
very well. But then I decided to use FreeBSD's ipfw + dummynet instead tc from 
the packet iproute2.

I dont know why libssh2 don't work when I try to connect ubuntu and FreeBSD
I saw how to use PHP and libssh2 from this article
http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/



 >-------- Оригинално писмо --------
 >От:  Peter Stuge  
 >Относно: Re:
 >До: [email protected]
 >Изпратено на: Понеделник, 2009, Октомври 5 18:40:03 EEST

 >Alexander Lamaison wrote:
 >> > This is a simple php script witch I use to connect to FreeBSD
 >> >
 >> > 
 >
 >If you want to display the output rather than parse it in code, I
 >suggest using passthru() instead of exec() and then you don't need
 >$lines at all.
 >
 >
 >If you plan on making more advaned use of libssh2 than simply
 >executing some odd command on a server, then please do as Alexander
 >described - please help us reproduce the problem using only C code.
 >
 >
 >//Peter
 >_______________________________________________
 >libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
 >
 
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
  • Re: Re: sdcsdc sdcsdc
    • Re: Mikhail Gusarov
    • Re: Peter Stuge

Reply via email to