Re: ssh within PHP

From: Tirumal B (tirumal_b_at_yahoo.com)
Date: 11/11/03

  • Next message: Eugene Lee: "Re: [PHP] Re: ssh within PHP"
    Date: Mon, 10 Nov 2003 23:05:02 -0800 (PST)
    To: php-general@lists.php.net
    
    

    Hello All,

     Its enough if i have the apache privileges. Can i
    login to apache user and to remote computer apache
    user with public key authentication and run some
    command there.

    thank you

    > On Tue, 2003-11-11 at 01:34, tirumal b wrote:
    > > Hello All
    > >
    > > I have written the following command in PHP script
    > > echo `ssh <ipaddr> <command>`. I have the remote
    ip
    > > addr as trusted, dont ask for the password at all.
    > > when the execute the php file from the browser it
    does
    > > not go to the remote ip at all though this command
    > > works fine in a normal bash script. what is the
    > > problem. Thanks in advance.
    >
    > Shell commands run from the browser inherit the
    browser's user --
    this
    > is usually httpd or apache.

    Correct: doesn't inherit the browser's user, but
    inherit's the web
    server's user.

    Cheers,
    Rob.

    -- 
    __________________________________
    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard
    http://antispam.yahoo.com/whatsnewfree
    

  • Next message: Eugene Lee: "Re: [PHP] Re: ssh within PHP"

    Relevant Pages

    • Re: Using Ssh, How To See Server Specification
      ... which command tells me the disk space, RAM size, swap size? ... How can I check if apache is installed or not? ... how to install them, but, i do not know how to uninstall default Red ... If you are not getting any response for rpm -q for apache use command ...
      (alt.os.linux.redhat)
    • Thanks!
      ... which was to display all errors including notices. ... actually the command to be used. ... With a older version of the apache and php ...
      (alt.php)
    • Re: Updating OS X default path to apache
      ... If you want to add a path to your PATH environment variable, you should do so in your .bashrc file. ... If .bashrc does not currently exist in your home folder, you will have to use a command-line text editor such as vim, pico, etc. to create one. ... Once you are done, to get the current terminal session to see your changes, enter the command: ... Doing all of this will solve your immediate problem of getting "which" to see the new install of apache. ...
      (comp.sys.mac.system)
    • mod_perl for apache insallation problem
      ... i want to configure apache with mode_perl after run make command i got this error ... plz help me how i can solve it ... Do you Yahoo!? ...
      (Debian-User)
    • PHP exec problems mp3test.php (01/01)
      ... Exec(), backticks, and systemwon't work from a webserver prospective. ... works perfectly fine if run from the command line, but will not show anything, ... if run from a browser (through the apache server). ... I've chown'd and chgrp'd the mp3info file to apache, I've copied the mp3info file to the php safe ...
      (php.general)