Php Open 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:
  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&


Re: Php Open Ssh library

Quoted text here. Click to load it

Have you verified that you can connect to the switch with command-line
ssh (no PHP involved at all)?  Are you using the same password/key
with PHP?

I suspect you want to fire up a shell (which on a switch isn't
/bin/sh) with ssh2_shell(), then pass commands to it interactively
with fwrite() and get back a result with fread().  ssh2_exec() may
be trying to run named programs on the switch, of which there may
not be any.  No, I have not tested this.  I don't have a switch
that supports ssh.

If you want help, and something doesn't work, answer the questions:
How do you KNOW it doesn't work?  What was the error message?  Run
with error_reporting turned up to its highest level.  The default
reason "it doesn't work" means that the switch is picketing your
house carrying a sign saying "YOUR NAME HERE is unfair to ethernet

Re: Php Open Ssh library

I will test it when return home.

Site Timeline