Often some hosts in a corporate network are available only from several gateway machines. The scheme looks like this: you connect to the gateway with ssh -A gateway.public.net and then to the desired host from the gateway machine with ssh -A host.private.net. But the problem arises when you want to copy or download something from host.private.net. You have to do it in two hops, because host.private.net is not available from your machine directly. The solution is SSH forwarding.
Just add the following lines (edited according to your network settings) to ~/.ssh/config:
1Host gateway
2 User bikulov
3 ForwardAgent yes
4 HostName gateway.public.net
5 IdentityFile ~/.ssh/bikulov_private_key
6
7Host host
8 User bikulov
9 ForwardAgent yes
10 ProxyCommand ssh -4 gateway nc -q 0 host.private.net 22
The ForwardAgent option forwards information about your SSH key bikulov_private_key to gateway.public.net. Now you can just type ssh host in the terminal. You will be connected to host.private.net through gateway.public.net automatically. And scp now works directly too.