Copying a file from one server to another (behind firewall.)

Hi,

I want to copy a file from one server A to another server B. Usually I use

scp username@source-server:/path . (from the destination folder)

However, in this particular case, I have server C behind a firewall. So, I connect to Server B and ssh over to server C.

--this is the source server--
cleveland</home/jdoe><jdoe>#

--this is the "hop over" server--
[jdoe@ford:/home/user]> pwd
/home/jdoe

--this is where I want the file--

[jdoe@ford:/home/jdoe]> ssh xtra400
jdoe@xtra400's password: 
Last login: Mon Aug  9 11:47:26 2010 on /dev/pts/0 from 17.78.200.21
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 5.3!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
xtra400():/home/jdoe> 

----this is what I tried unsuccessfully----

[jdoe@ford:/home/jdoe]> scp jdoe@cleveland:/home/jdoe/login.sql .
##############################################################################
# This system is for use by authorized personnel only. Individuals using     #
# this computer system without authority, or in excess of their authority,   #
# are subject to having all of their activities on this system monitored     #
# and recorded by system personnel. In the course of monitoring individuals  #
# improperly using this system, or in the course of system maintenance, the  #
# activities of authorized users may also be monitored. Anyone using this    #
# system expressly consents to such monitoring and is advised that if such   #
# monitoring reveals possible evidence of criminal activity, system          #
# personnel may provide the evidence of such monitoring to            #
# Senior management and HR.                                                  #
##############################################################################

jdoe@cleveland's password: 
login.sql                                                                                                                                      100%  361     0.4KB/s   00:00   
[jdoe@ford:/home/jdoe]> ssh xtra400
jdoe@xtra400's password: 
Last unsuccessful login: Fri Jun 11 14:24:40 2010 on ssh from 17.78.200.21
Last login: Mon Aug 23 10:47:29 2010 on /dev/pts/1 from 17.78.200.21
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 5.3!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
xtra400():/home/jdoe> scp jdoe@ford:/home/jdoe/login.sql .
ssh: ford: no address associated with name
xtra400():/home/jdoe> rcp -p jdoe@ford:/home/jdoe/login.sql jdoe@xtra400/home/jdoe/log.sql .
host: name ford NOT FOUND

Can someone tell me how do I do this or what i am doing wrong here? I know this can be done, because I have seen my colleagues copy files from Cleveland to Xtra400. I asked them, and all they say is since XTRA400 is behind a firewall, you ssh over to it from ford, and then copy over the file!

Please help me!

One of these computers does not know who "FORD" is. Try giving it an IP address instead.

Ok, I was told, I can't pull the file from ford (assuming I was logged into XTRA400) because of the firewall.

I must push the file from ford to xtra400 using scp.

Any ideas how do I do that??

Presumably the same way you'd copy from any other machine. We're pretty limited on the details of your network and firewall here.

Really, though: Reading the error messages can be a worthwhile pastime. Your previous attempt failed, not because of a firewall, but because the originating system didn't know who ford was. It never even tried to copy the file, just spun for a while looking for the 'ford' hostname then gave up. If you give it the IP address for ford instead of the name "ford", it might work.