Supondo que você queira executar o comando scp no prompt de comando do final:
# have the local client tell the remote server's sshd to listen on
# port 8765 (randomly chosen) and forward any connection it receives
# to the client which will connect to port 22 locally.
user0@initial:> ssh -R127.0.0.1:8765:127.0.0.1:22 -p 443 user1@intermediate
# On this machine have the client tell this remote server's (final's)
# to listen on port 9876 (randomly chosen) and forward any connection
# that it receives back to this client which will connect it to poirt
# 8765 locally.
user1@intermediate:> ssh -R127.0.0.1:9876:127.0.0.1:8765 user2@final
# Now that you are on the final server (final) you run scp, telling
# it to connect to localhost on port 9876.
#
# So scp will connec to local (final's) port 9876, which is listened
# to by the local sshd based on our second command above. That sshd
# will forward the connection to the ssh client that connected to it
# (on intermediate).
#
# The ssh client on intermediate will connect to localhost:8765 as
# instructed which is a conenction to the sshd on intermediate that
# is listening on that port because it was instructed to do so by the
# ssh client on initial when it connected.
#
# The sshd on intermediate will forward the conenction back to the
# client on initial which will, as instructed, connect to localhost:22
# on initial.
#
# All this monkey motion means that now scp on final is "directly"
# connected to port 22 (sshd) on initial and can initiate a login
# and file transfer. to the ssh client that connected to it (on
# intermediate).
user2@final:> scp -P 9876 file_from_final 127.0.0.1:back_at_the_house
Note que eu fiz as portas todas em 127.0.0.1, que protege elas da exploração por outros na internet (mas não de outras em "servidor" ou "final".