Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008

    Connecting to remote shell + doing commands?

    I want to make a script that will connect to a remote shell & do 2 commands.


    pkill apache2
    cd root

    is that possible in php?

  2. #2
    Join Date
    Jan 2004
    you need to use ssh2_connect

    however there are security risks.

    hopefully this helps to some degree.
    Last edited by Flumps; 10-10-2009 at 11:49 AM.

  3. #3
    Join Date
    May 2009
    Unless of course, you're not using PHP...can you be a little more specific?

  4. #4
    Join Date
    Mar 2009
    I wouldn't use php for something like this. Try Net : : SSH : : Perl (had to break that up b/c it turned into smileys) if you're familiar with perl. I've used it in the past without problems.

Similar Threads

  1. Pascal shell commands?
    By effusionx1 in forum Programming Discussion
    Replies: 1
    Last Post: 12-09-2005, 06:33 AM
  2. i need help with some shell commands...
    By deagly in forum Programming Discussion
    Replies: 3
    Last Post: 08-31-2005, 09:47 AM
  3. Run shell commands with PHP ?
    By The Broadband Man in forum Programming Discussion
    Replies: 15
    Last Post: 05-31-2005, 01:29 PM
  4. executing shell commands through php
    By Angelo in forum Programming Discussion
    Replies: 12
    Last Post: 04-25-2005, 12:01 AM
  5. Running SQL commands from shell
    By Franki in forum Hosting Security and Technology
    Replies: 7
    Last Post: 09-04-2002, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts