|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Here's my nightmare:
I'm gathering info on a web form that is hosted by a shared hosting provider. I want this information to go securely to a mySQL database on a server here at my office. This would best be done via an SSH tunnel, right? However, I'm not sure how to do an SSH tunnel, with no shell access to the shared hosting space. Since it's getting called from a script, I can't type in a password, and I can't run ssh-keygen. What other alternatives do I have? Thanks. |
|
#2
|
||||
|
||||
|
I believe you can have a cgi copy the data to your other machine via ssh (scp, sftp, etc.) Be sure to make the account that communicates with your local server can only upload files to a single directory and can't execute anything at all (else your cgi could be hyjacked for use in penatrating your local computer).
__________________
Left DevShed May 28, 2005. Reason: Unresponsive administrators. Free code: http://sol-biotech.com/code/. Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html. Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html. It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it. --Me, I just made it up The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man. --George Bernard Shaw |
|
#3
|
|||
|
|||
|
Quote:
That would involve storing the data on the web server for some length of time before copying. I don't want it to ever be stored there - I want the form to directly pipe the data to us into our local mySQL database. It's credit card info, etc...so I don't want it hanging out on the server at all. |
|
#4
|
||||
|
||||
|
Why should that require ever writing it to disk? Each call of the CGI can make the connection to your local server and copy the data.
|
|
#5
|
|||
|
|||
|
Quote:
Can SCP just copy over variables? I thought it copied files only. |
|
#6
|
||||
|
||||
|
The point I am trying to make is that secure communication has nothing to do with files. scp, sftp, etc. are all examples of applications. If you embed the secure communication code directly in your cgi then you can do whatever you want. Check out OpenSSL for a library that you should be able to include in your project.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Security and Cryptography > SSH tunneling from a shared web host |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|