![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| probloem in scp command 99% content only transfers | GovindGembali | UNIX for Dummies Questions & Answers | 1 | 06-20-2008 03:43 AM |
| History of old FTP transfers | Nakul Mukerjee | UNIX for Dummies Questions & Answers | 4 | 05-02-2007 03:39 AM |
| gateway | big123456 | Linux | 3 | 11-21-2005 10:12 PM |
| Automate FTP / Scripting FTP Transfers | Perderabo | Answers to Frequently Asked Questions | 0 | 05-20-2004 05:50 PM |
| text files, ASCII files, binary files and ftp transfers | Perderabo | Answers to Frequently Asked Questions | 0 | 04-08-2004 01:25 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
ssh - transfers with gateway hopping
Hi,
I am having trouble transferring files from a source UNIX machine to a destination UNIX machine by hopping via 2 gateway machines. The user used for the transfer has been setup/authorized so no password is required to login. Summerized: source to gateway1 to gateway2 to destination This is the command executed from the source computer: tar cf - .|ssh gateway1 ssh gateway2 "ssh dest 'cd /tmp;tar xf -'" I get following error: tar: blocksize = 0 If I change the command to: tar cf - .|ssh gateway1 ssh gateway2 "ssh dest tar xf -" Then the files are transferred albeit into the wrong directory but the command on the source computer never completes. How can I fix: 1) get the cd /tmp to work 2) get the command to come back when the transfer is complete Thanks for any help |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Can you please explain your scenario?
Are you able to connect to destination system? I don't think these gateway's should matter. - nilesh |
|
#3
|
||||
|
||||
|
I think you need to run the commands at the destination in a sub-shell at the destination (replace the single quotes with parenthesis)
Code:
tar cf - .|ssh gateway1 ssh gateway2 "ssh dest (cd /tmp;tar xf -)" And the reason the originating tar doesn't complete is probably because it is waiting for input from the command line (tar cf -) for the files you wish to archive. to close it you need a CTRL-D in the input stream, or give it a list, or a toplevel directory (tar cf - /top/level/directory/) Last edited by wempy; 09-29-2008 at 04:18 AM. Reason: clarification and correction |
||||
| Google The UNIX and Linux Forums |