Tranferring files between remote servers

germain

New member
Joined
Feb 3, 2009
Messages
3
I operate both a dedicated server through DircetAdmin and a separate hosted shared server with another service. Using ssh, I have root access on the dedicated server and a jailed shell with he hosted server. I am attempting to transfer some files from one server to another.

While I was successful in initiating the transfer using the wget -r http://domainname/directory/* command, I was not able to control the transfer. Instead of pulling just from the directory I designated, the entire drive on the dedicated server that I pointed to ended up in the download queue. I had to kill the process and didn't get all the files I needed.

I also considered using the mget or mput commands but am unable to create an ftp connection between the servers from either direction. When attempting to connect with the jailed shell to the dedicated, I am directed to provide the user name & PW but given no prompt to enter the information. When attempting to connect in other direction, I am denied permission and not even given to opportunity to log on with user name and PW.

The drive I am attempting to pull from has over 600 gigs of files, so letting it pull everything and deleting what I don't need isn't an option.
 
No, I had not tried the scp command. At this point I am not able to properly write the command to initiate the transfer.

I logged onto the receiving server (host 1). I want to copy an entire directory and all it's sub-directories from host 2 onto host 1. I used:

scp -r username@host2:../home4/directory-to-copy/* username@host1:directory-to-receive

I am prompted for the PW on host 2. Then nothing further. I have tried several variations of the above command but can get no further.
 
Try this:

Code:
scp -r username@host2:/home4/directory-to-copy/ username@host1:/directory-to-receive

The user for the remote server must also have ssh access for this to work.
 
Back
Top