user6473833 user6473833 -4 years ago 102
Linux Question

Linux file copy from mounted NAS to remote server using scp

file1 is on the NAS mounted ServerA.

ServerA
/mntnas/file1

ServerB
/dest

If doing:
user@ServerA> scp /mntnas/file1 user@ServerB:/dest

will the file1 transfer go through ServerA or directly from NAS to ServerB?

Thanks.

Answer Source

You are logged in as user on ServerA, therefore scp will start an ssh session from ServerA to ServerB to copy the file.

Because scp doesnt know anything about networked storage it will let the filesystem handle giving it the bytes that the file is made up of, so your file will be transferred from

            NAS -> ServerA -(ssh tunnel)-> ServerB
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download