I've been struggling with this for 2 days already.
I have 2 linux machines A and B and trying to run the following command from A remotely (as it would be done on B locally):
sshpass -p 'somePassword' ssh userName@machineB "wget http://someUrl.com/someFile.zip"
someFile.zip should be downloaded and kept on B but I get connection timeout. Running this command directy on macnine B works fine. I presume there are some issues with SSH.
This script is needed for TeamCity continous integration.
p.s. sshpass is just an utility to run command via ssh without user interaction by specifying password.
What the issue and how to fix it? Thank you.
UPDATE: Proxy settings should be specified in ~/.bashrc file for non-interactive sessions. The reason is that proxy setting were in /etc/profile which works only for interactive sessions.