I have three machines. The local machine L, Server1 A, Server2 B. L is able to connect to A A is able to connect to B L is not able to connect to  B I want to copy a file from L to B without taking the extra step to login on A for coppying the data.Is that possible with scp? If yes, how?
How to copy a file with scp via another server
linux;scp
L is not able to connect to B, but is B able to connect to L? You didn't say, but I will assume no.If A is your only way to communicate between B and L then you will definitely have to log in to A at some point. And also, the data will flow through A one way or another (which might be important if A is on a slow connection).You can establish an SSH tunnel through A in a couple of different ways to get from L to B. For example:# From Lssh -L 2222:B:22 -Nf ANow add the following configuration in ~/.ssh/config on L as a convenience for connecting to B through the tunnel:Host B    HostName localhost    HostKeyAlias B    Port 2222Then you can connect to B through the tunnel:scp file B:There are other options for setting up this tunnel, including tools to automatically establish the tunnel in the background.