473,385 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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?

Feb 10 '08 #1
2 1804
"lawrence k" <lk******@geocities.comwrote in message
news:5b**********************************@v67g2000 hse.googlegroups.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?
Feb 10 '08 #2
On Feb 9, 10:35 pm, "McKirahan" <N...@McKirahan.comwrote:
"lawrence k" <lkrub...@geocities.comwrote in message

news:5b**********************************@v67g2000 hse.googlegroups.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.

Feb 16 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gus M. Creces | last post by:
Hi... I'm looking for some information, technical, white paper - whatever - on how SFTP works. I need to add SFTP capabilities into an app's present FTP capabilities. I'm not really looking for a...
4
by: Luke Vogel | last post by:
I've looked everywhere ... Is there anywhere that has the source code for a SFTP client that I can modify for my needs? Please? -- Regards Luke. -----
0
by: Bernhard Günther | last post by:
Hello friends of php, PhP-Version is 4 on a FreeBSD-System using apache. Got a problem using ssh2.sftp. Installed correctly (libssh2, ssh2.so-module). Connecting with publickey works,...
7
by: RadhakrishnanR | last post by:
How i can implement SFTP in VB. Scenario is I want to take file from SFTP server, then after some process with the file , file will be moved to database.. Our requirement is very clear that how...
12
by: jcor | last post by:
Hi, I'm using Ubuntu 7.04. I'm writing a sript that sends files via ftp for several destinations. So far I used Net::FTP and it worked fine. My problem is that I need to send files via SFTP...
0
by: arkascha | last post by:
Helloooo everyone, I have a problem with a small solution I made some three or four years ago. Worked flawless until deployed onto newer machines now and guess what, I cannot fix it. Maybe some...
4
by: sa6113 | last post by:
I want to use sftp from paramiko to copy a file from a windows machine to a Linux in the network, I use this code : host = "LinuxComputerName" (or its Ip) port = 22 transport =...
7
by: K Viltersten | last post by:
As i noticed, there's no built-in facility for working with SFTP in DotNet. So, i'd like to learn how to build that up. When i went googling for knowledge, i only get a ton of hits on tutorials...
2
by: sivashanmugam | last post by:
Hi Friends, I tried to send some zips from local to remote location but the transfer is not sucess i can transfer the zips partially can some one assist me how to make it as sucess i had...
1
by: ndedhia1 | last post by:
I was hoping you could help me out with ftp vs sftp. Below is a method that I have that I call to ftp files from one unix box to another in house, but soon, we will have to ftp from here to NY so...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.