In my company we access our remote electronic devices through a jump server. When we need to download files from the devices we do the following:
- ssh jump.server.com
- wget ftp//device_ip/filepath (this downloads the file to the jump server)
- scp the jump server from local machine to get the file.
I am trying to simplify this by using ssh port forwarding to be able to download the file directly from the remote devices to our machine. I followed this answer:
ssh -L 9000:device_ip:21 jump.server.com wget ftp://localhost:9000/filepath
But I am getting the following error:
227 Entering Passive Mode (10,192,1,16,19,129). trying to connect to 10.192.1.16 port 4993 Closed fd 4 Closed fd 3 couldn't connect to ipaddress port 4993: Connection timed out Giving up.
The issue is not the passive mode that wget uses because it works when using the old method.
Any suggestions in what could be causing the problem? Our computers run Ubuntu if that helps.