SSH using php ssh library

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Does you now evereone about programing ssh for configure ethernet swith
DES-3526 .If you now somewone who can help me give me hi`s  malL.
t would be great if
you could help me out
My problem is:I am using php ssh library php_ssh2.dll
or php library for linux
  a connected to switch using ssh2_auth_password($connection,
'username', 'secret'))
but a can`t
open shell ssh2_shell($connection, 'vt100' );
and a cant execute comands  using ssh2_exec($connection, 'comand');
What can i do to write data to the switch&

Control Ethernet switch from script using SSH

We have Ethernet switch with SSH and web interface. We want control it
  and want to do this from script (we have database with allowed MACs and
  want to sync switch list according to database). We tried to do this
  directly from PHP using ssh2 extension but with no luck (ssh2_shell and
  ssh2_exec fails). We don't want to use web interface because of security
  problems, speed and complexity. So for current moment we try to find
   any way to program switch. Is here any possibility to do this using
Linux  utilites? (Yes, I know about security flaw with switch password
if it  will be written in script).

Re: Control Ethernet switch from script using SSH

Quoted text here. Click to load it

You don't really say what kind of switch it is. The COSI-NMS site will have some tools for
connecting to Cisco switches via SSH. If you don't have cisco, you can
probably take what they've done and adapt.

Most of it will be doing perl or expect driving the ssh binary to do
the work.

Site Timeline