[CentOS] scp via another server
agents at meddatainc.com
Sun Jun 12 18:43:21 UTC 2016
On 06/12/2016 08:28 PM, J Martin Rushton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On 12/06/16 18:07, H wrote:
>> On 06/12/2016 05:21 PM, J Martin Rushton wrote: $ scp
>> svr2:/path/to/source svr1:/path/to/dest
>> You'll get twice the network traffic since the copy is running on
>> your workstation (or whatever).
>> On 12/06/16 15:40, H wrote:
>>>>> I normally use ssh to log into a remote server, change
>>>>> directory and then use scp from there to copy files from
>>>>> another remote server to the first one.
>>>>> Now the first server has been hit by continuous error
>>>>> correction messages from the ECC controller, all of which are
>>>>> corrected, and I am unable to get a command line to issue the
>>>>> required commands to change directory and then run scp from
>>>>> the other server. I have no problems, however, getting into
>>>>> the first server - except for being drowned by the error
>>>>> correction messages and the server seems to be running
>>>>> Until I am able to get to the server and investigate, is it
>>>>> possible to accomplish the above on a single command line,
>>>>> thus avoiding seeing the error messages? I should add that
>>>>> both the first and second server are set up to accept keys
>>>>> and not passwords so at least I don't have to worry about
>>>>> Thank you. _______________________________________________
>>>>> CentOS mailing list CentOS at centos.org
>>> _______________________________________________ CentOS mailing
>>> list CentOS at centos.org
>> This did not work even though the same user is authenticated on
>> both servers and I have no problems ssh'ing into either of the two
>> servers. The message is "permission denied."
>> Presumably some problem with being recognized on both systems?
>> _______________________________________________ CentOS mailing
>> list CentOS at centos.org
> It sounds like it. Try:
> $ ssh svr1 pwd
> $ ssh svr2 pwd
> If they work without asking for a password then there is a deeper
> configuration issue. If you do get prompted for a password then you
> need to sort out your access. If the username differs try
> <user>@<host> both for the ssh test and the scp command.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
> -----END PGP SIGNATURE-----
> CentOS mailing list
> CentOS at centos.org
I don't know. I have no problems with 'ssh user1 at server1' and 'ssh user1 at server2' or running 'scp user1 at server2:somefilesserver2 tolocationonserver1' after having ssh'ed into server 1.
I just tried 'ssh user1 at server1 'scp user1 at server2:somefilesserver2 tolocationonserver1'' which worked fine suggesting that the configuration is correct.
There seems to be something broken when using scp between two remote locations. Some posts on the 'net suggest using 'scp -3' to do an intermediate copy to the workstation between the two remote servers but that option does not seem to have been implemented yet on scp for Centos 6.7.
More information about the CentOS