Php Open Ssh library

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Konstantyn

    Php Open Ssh library

    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_passw ord($connection ,
    'username', 'secret'))
    sucsessfully
    but a can`t
    open shell ssh2_shell($con nection, 'vt100' );
    and a cant execute comands using ssh2_exec($conn ection, 'comand');
    What can i do to write data to the switch&





    Thanks,
    Konstantyn
  • Gordon Burditt

    #2
    Re: Php Open Ssh library

    >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_passw ord($connection ,
    >'username', 'secret'))
    >sucsessfully
    >but a can`t
    >open shell ssh2_shell($con nection, 'vt100' );
    >and a cant execute comands using ssh2_exec($conn ection, 'comand');
    >What can i do to write data to the switch&
    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
    packets".

    Comment

    • Varlamov Konstantyn

      #3
      Re: Php Open Ssh library

      I will test it when return home.

      Comment

      Working...