What tunnel
do you mean you have ssh connected and are forwarding port 80, and connecting to 127.0.0.1 on the client? Ftp is different from http, it uses a ramdon port to connect on. All you need to do is use a remote login and then connect to your server on the internet. I guess you have no server on the internet and want to access the internal machine using a windows client. If this is the case you can setup http upload using cgi or perl and you could set / or any other folder as the http document root, so you can download anything you want to. you need to make sure the server is only accessable from the local machine or this would be a gaping hole in your security. The thing I am trying to say is that the best way to do this is to login to the internal machine, then you can use any method you wish to transfer files and do anything else. This of course requires a server on the internet to transfer files to. Otherwise this is going to become much more complicated. You are going to need to do a lot of configuration of the http server to provide file upload functionality. If however you just want to get files from the internal machine you can just download them. The problem is http is a sloppy protocol for file transfer. Files should probably be put into some zip format before download so they can be verified on the other end when they are unzipped. You might want to look into scp ( a function of ssh ) as a possible solution if all you need to do is transfer files. |
You see, I'm using a windows version of openssh to make a reversable connection. If ftp wont work, then I just need to configure apache to only allow connections from people who have an account on both ends. You see, my teacher wants me to figure this out, so he can download and upload files from home. but I dont want just anyone from inside the school to go to his website and download files from the my documents folder. At least he would be able to download files from this.
|
ok,
You will need to setup apache to do http uploads and set the doc root or a virtual domain to a folder above where the files are. You need to block all outside connections to the http server. The connection to localhost on the client is actually a connection to localhost on the server. The other choice.... I think there is a windows client for scp have a look at putty for windows and see if it can do file transfers over the ssh connection. |
putty also has psftp which works well for file transfer
you would just use it to connect to the local machine on the forwarded port, it uses ssh |
my teacher cann't function without a gui, dont ask me why he's our computer engineering teacher either. but he NEEDS a gui. do you know how to set those permissions in apache? I dont mean to be so cumbersome.
|
do you mean the document root or virtual domain?
upload or just download <Directory /var/www/upload> EnablePut On Options +Indexes AuthType Basic AuthName Temporary AuthUserFile /etc/httpd/conf/access/upload/.htpasswd EnableDelete Off umask 007 require valid-user </Directory> <VirtualHost *> ServerAdmin admin@domain.com DocumentRoot /var/www/upload ServerName upload.domain.com ErrorLog logs/dm3-error_log CustomLog logs/dm3-access_log common </VirtualHost> you will need a webpage interface and cgi script to actually do an upload upload.html Code:
<html> <Directory /home/user/Documents> order deny,allow deny from all allow from localhost .localdomain Options Indexes FollowSymLinks </Directory> -------------------------------------------------------------- DocumentRoot /var/www/html Tell him to get a GUI for windows that supports sftp and connect it to localhost on the forwarded port. I'm sure you can get a number of them that will work. |
upload.cgi
Code:
|
I dont have perl on the computer because both computers are running Windows XP. I trust linux software above any other, and believe the linux programmers know exactly what they're doing. However, I need this cabability from two windows computers. I installed a windows version of openssh and apache. That is why sftp didn't work, and I needed apache to do the file management. But this means that the cgi script you gave me wont work. Is there another way to upload files to my windows apache web server?
|
now I'm confused :)
Quote:
|
if you have ssh you can still do ftp to the internet from the ssh login. The computer on the internet has to be the server.
You could get an account on a server that has ftp upload, then you would not need to run an ftp server and you could still share files through it. |
if you simply must have a gui then run vnc and tunnel it through ssh
once you are connected you can do anything you want, including using a gui ftp program to send file to or receive from an ftp server. I think I would just type `ftp user:password@ftp.domain.com` into a dos prompt and get on with it. viewing the desktop over a slow connection is going to be painful. |
Urm... don't want to butt in on this...
But there's a GUI version of scp :) ssh.com recently released their ssh for Workstations for non-commercialy use free. You can download it here : http://www.ssh.com/support/downloads/secureshellwks/ and it has a very nice GUI scp program that integrates well with it. :) Slick. |
The situation has changed from when I first started this thread. At first I wanted to access my server at home, now my teacher wants to access his windows xp computer at home, with the best security possible. The windows version of openssh does support sftp, only remote command prompt. But it the thing you said first about the ssh -R 8080:localhost:8080 <ip of home compuer> worked, and now I want to send files back and forth between the two computers. I tried IIS ftp, but it wouldn't work because it gave invalid syntax commands. I tried IIS web server, but could only get the anonymous user to work. I need more security. So I downloaded the new appache web server for windows and installed it. Now I have apache working on port 8080, and it denys everyone but 127.0.0.1, however, I now needs a means of having the web server upload files from the home computer, back to the <hidden behind school routers> work computer. I looked at your upload.cgi script, and noticed you were using perl for uploads. When I try to upload files, it just times out. I need another cgi script that is compatible with windows software. Thank you so much for your help so far!!!!!!!!!!!!
|
if the windows version of ssh works for forwarding http then there should be no problem using scp.
I believe I would go with that over trying to establish an http upload. scp is much more of a suitable protocol for file transfer than http. The same idea would apply. you would forward the ssh port and connect to the local port with scp scp is secure copy and is a lot like sftp. |
You will need CGI.pm for the script to work
There may be other scripts available for this. I am sure you can do it with http if you must do it that way. cgi-bin works with most any platform |
All times are GMT -5. The time now is 02:33 AM. |