I mean to copy files from one remote server to another.
If using
scp -3
, command succeeds (I have remote1
and remote2
in my ~/.ssh/config
)
$ scp -p -3 remote1:dir1/file1 remote2:dir2/
but when not using -3
, it fails
$ scp -p remote1:dir1/file1 remote2:dir2/
ssh: Could not resolve hostname remote2: Temporary failure in name resolution
lost connection
**Why is that?**
As I understand from man scp
and other sources, -3
is not mandatory, but simply
-3 Copies between two remote hosts are transferred through the local host. Without this option the data is copied directly between the two remote hosts.
I am using msys2, I wouldn't know if that makes any difference.
Asked by sancho.s ReinstateMonicaCellio
(2998 rep)
Jul 8, 2021, 08:20 AM
Last activity: Jul 8, 2021, 08:55 AM
Last activity: Jul 8, 2021, 08:55 AM