From the scp man page:
-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. Note that this option disables the
I'd suggest that the problem is that your machine
embserv cannot "see" your other machine
serhan-Lenovo-B560, or, if it can, it can't resolve the name.
When you invoke scp with two remote machines, what it actually tries to do is something like this:
ssh canserhan@embserv "scp ~/tar_files/rtl_archive.tar serhan@serhan-Lenovo-B560:~Documents$"
That's a Good Thing as it means the copy will be more efficient, but it requires that scp from machine A to machine B works, which it won't always.
If that is the problem, you can solve it by using
-3, or by passing the numeric IP address of
serhan-Lenovo-B560 (if the name is the problem), or by fixing your ssh setup on
embserv so that it can reach
So, try this:
scp canserhan@embserv:~/tar_files/rtl_archive.tar email@example.com:~Documents$
xxx.xxx.xxx.xx is your server's IP address.
or, if that fails, this should definitely work, but will run more slowly:
scp -3 canserhan@embserv:~/tar_files/rtl_archive.tar serhan@serhan-Lenovo-B560:~Documents$
By the way,
~Documents$ also looks wrong. Are you sure it shouldn't be