I have recently set up a home/work VPN connection via the openconnect client (i don't know if this matters) and I am able to login into the various gateway machines at work, but I am unable to scp , or rsync to anything that is behind those gateways.
So, I can do a
ssh gateway and then, after I'm in the server, I can execute
ssh work_machine. So, standard, interactive ssh works.
Next, I have tried to scp and rsync to the work_machine. In order to achieve this , I made a jump host entry in the .ssh/config:
Host work_machine Hostname work_machine_hostname ProxyJump gateway User user
However, trying to do a
scp /local/path/file work_machine:/remote/path just hangs. This happens with rsync, too.
Does anyone have a clue what is going on?
I have tried with tunneling, too. I made a tunnel to the gateway, while keeping the jump host config for the work_machine . Again, I can ssh into the work_machine, but I can't scp, or rsync to it.
I think I'm going back to the good old tunneling until the rest of the utilities catch up. It's one script extra to set up the ports on the local machine, but it's reliable.
By the way, the ssh client is 7.3p1 on Ubuntu 16.10 .
Totally removed jump hosts and went back to tunneling.
ssh -f -N -L 12345:gateway1:22 ssh -f -N -L 12346:gateway2:22 gateway1 Host tgateway2 Hostname localhost Port 12346 User user
Now the last tunnel,
ssh -f -N -L 12347:work_machine tgateway2
Host twork_machine Hostname localhost Port 12347 User user
This setup used to enable me to access twork_machine directly, even if it was hidden behind two gateway machines. scp and rsync used to work, too. Now only interactive ssh , as in
ssh twork_machine works, but no scp and rsync. The scp command just hangs at the step
scp -v -t (from the verbose output of
scp somefile twork_machine:)