I'm trying to set up a cron job. Here's my problem: I need to download something on my server...and then send that file (an mp3) to a second server. BUT, I'm having some firewall problems on the second server's domain (and I don't control that firewall!). I can't get in directly to the final destination machine. I need to ssh into the firewall...and then ssh into the final destination on that domain.
Here's what I have so far:
Code:
#!/bin/sh
set -e
cd /downloads/
rm *.mp3
wget -nd -r -l1 --no-parent --no-passive-ftp -A.mp3 'ftp://user:password@server1'
ssh server2.com
sleep 10
ssh 192.168.2.245 (this is the final destination, which is on the LAN of server2.com)
sleep 10
/getdownloads.txt
Now, you might ask, why not download the mp3 directly to the final destination machine? I'd love to, but behind that firewall, I can't connect to that ftp site.
When I ssh into server2.com, the script above stops. Is what I'm trying to do possible? If so, what needs to be changed?
Thanks!
Recent comments
4 hours 46 min ago
14 hours 14 min ago
15 hours 3 min ago
18 hours 36 min ago
23 hours 56 sec ago
23 hours 22 min ago
1 day 1 hour ago
1 day 11 hours ago
1 day 16 hours ago
1 day 17 hours ago