how to ssh or scp or sftp through PHP?

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

    how to ssh or scp or sftp through PHP?


    On the company's webserver we have two harddrives. Apache is aware of
    one of those harddrives and serves websites from that harddrive. The
    other harddrive is not reachable via the web. I've written some cron
    jobs that make a backup of various MySql databases and saves a copy to
    that second hard drive.

    For added security, I'd love to have a cron job (on my home Ubuntu
    machine) that runs each night and downloads all the backups to my home
    machine. I thought I could write a bash shell script using scp to do
    this, but I now find out that one has to jump through several hoops
    (create private/public keys, etc) to do it.

    I'm wondering if there is an easier way to download the files, using
    PHP? Any thoughts on this?

  • McKirahan

    #2
    Re: how to ssh or scp or sftp through PHP?

    "lawrence k" <lkrubner@geoci ties.comwrote in message
    news:5b537a98-84ad-47fd-b1e4-2d1683b43572@v6 7g2000hse.googl egroups.com...
    >
    On the company's webserver we have two harddrives. Apache is aware of
    one of those harddrives and serves websites from that harddrive. The
    other harddrive is not reachable via the web. I've written some cron
    jobs that make a backup of various MySql databases and saves a copy to
    that second hard drive.
    >
    For added security, I'd love to have a cron job (on my home Ubuntu
    machine) that runs each night and downloads all the backups to my home
    machine. I thought I could write a bash shell script using scp to do
    this, but I now find out that one has to jump through several hoops
    (create private/public keys, etc) to do it.
    >
    I'm wondering if there is an easier way to download the files, using
    PHP? Any thoughts on this?
    What is your company's policy concerning corporate data security?


    Comment

    • lawrence k

      #3
      Re: how to ssh or scp or sftp through PHP?

      On Feb 9, 10:35 pm, "McKirahan" <N...@McKirahan .comwrote:
      "lawrence k" <lkrub...@geoci ties.comwrote in message
      >
      news:5b537a98-84ad-47fd-b1e4-2d1683b43572@v6 7g2000hse.googl egroups.com...
      >
      >
      >
      On the company's webserver we have two harddrives. Apache is aware of
      one of those harddrives and serves websites from that harddrive. The
      other harddrive is not reachable via the web. I've written some cron
      jobs that make a backup of various MySql databases and saves a copy to
      that second hard drive.
      >
      For added security, I'd love to have a cron job (on my home Ubuntu
      machine) that runs each night and downloads all the backups to my home
      machine. I thought I could write a bash shell script using scp to do
      this, but I now find out that one has to jump through several hoops
      (create private/public keys, etc) to do it.
      >
      I'm wondering if there is an easier way to download the files, using
      PHP? Any thoughts on this?
      >
      What is your company's policy concerning corporate data security?

      I'm allowed to download the files, if that is what you need. I'm one
      of the owners of the firm, and I'm the one who does most of the
      sysadmin stuff (though I'm not really a sysadmin, obviously). So I'm
      allowed to do it, so long as I can figure out a secure way to do it.

      Comment

      Working...