I have a problem about transferring files between hosts. Lab environment is like:
My host <-> Host A <-> Host B
I only have access to Host A and I want to transfer files to Host B. Host A has access to Host B.
I want to use scp
to transfer file from my host to Host B directly.
I have tried ssh -L :8899:<host-B>:22 user@host-a
and scp -P 8899 myfile.txt user@localhost:/path/to/store/files
. But failed :(
channel 2: open failed: administratively prohibited: open failed ssh_exchange_identification: Connection closed by remote host lost connection
How can I realize this job?
Note: When I ssh to Host A, I have to input password generated by a RSA token. Is this the reason why I got error message ?