Transferring Files via Reverse SSH
I currently have clients to where I have them reverse ssh into my company ssh server and then I just simply connect to them via a tunnel to my ssh server.
PHP Code:
|
|
thanks for the reply but how I would do it via a reverse ssh connection?
|
You can ssh into computer B and then scp back to computer A. As I understand it, ssh is for command and control, scp is for file transfer.
I just ssh'd into my file server and scp'd a file back to this computer and it arrived safely. Alternatively, if I understand the rsync man pages correctly, rsync can be used to pull from a remote host as well as to push to a remote host, but I've never tried that. I've just learned how to use rsync for backups. I shall enjoy the glow from that for a while before moving on. |
Quote:
Code:
ssh -R 1234:localhost:22 my_ssh_server |
exactly,
I have my clients connect to an ssh server in my office and then from whenever I am I just simply ssh(locally port forwarding) and connect to my client. PHP Code:
thanks for the reply. |
Maybe you have to combine two tunnel. E.g.:
Client does: ssh -R 1234:localhost:22 my_ssh_server (maybe with -N if a command prompt isn't needed) You do on your local machine: ssh -L 4567:localhost:1234 my_ssh_server (maybe with -N if a command prompt isn't needed) Then something like this should work on your local machine: scp -P 4567 my_file localhost: or: scp -P 4567 localhost:my_file . or: sftp -oPort=4567 localhost (you can use the same port number, but I used different ones here to make clear they needn't to be the same.) |
thanks for the reply, so how would I be able to look at the files on the remote machine before copying? Some of my clients are using windows machines. that is the tricky part! So a typical client connection would be like this:
The my client with a windows machine connects to my ssh server using PHP Code:
and I from a remote location location: PHP Code:
1 - How would I transfer files to a windows machine via this method? 2 - How can I view the files on the remote linux client via method? |
One way is to install Cygwin and get an SSH daemon on the Windows machine running.
Another way could be enable File Sharing on the Windows machine and use the necessary port in -R. Then access this Windows Share from your local machine. |
your awesome thanks.
|
All times are GMT -5. The time now is 11:02 AM. |