![]() |
Cron Job Question
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/shWhen 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! |
Why don't you open one session to the firewall that portforwards to the inside machine.
then your second connection can connect to the forwarded port which sends you direct to the inside machine. |
What? Can you give an example please?
|
Okay this is how u do it, you can create a config file ~/.ssh/config
Code:
Host firewallWhen you Code:
ssh -P 2222 localhostOr you can do it on the command line ssh firewall -L 2222 host_behind_firewall_ip:22 |
Thanks for the help, topdog. I can't get past the firewall, though. Not sure what it's doing...and since I don't control it, not much I can do.
Would it make more sense to run the cron job on the final destination machine and then ssh into my server...and then scp the files back to the final destination? I can get from the final machine to my server through that firewall...just not to the ftp site to download the mp3s. |
| All times are GMT +2. The time now is 07:16. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.