By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,092 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,092 IT Pros & Developers. It's quick & easy.

HTTP GET/POST on remote machines

P: 20
I need to perform HTTP Posts on a remote machine from a remote machine. Is this possible ?

Say for eg. I ssh into a Linux Box B from my script on Linux Box A and I need to do a HTTP GET/Post from B to say google.com

Is this possible?
Jun 5 '07 #1
Share this Question
Share on Google+
7 Replies


Motoma
Expert 2.5K+
P: 3,235
I need to perform HTTP Posts on a remote machine from a remote machine. Is this possible ?

Say for eg. I ssh into a Linux Box B from my script on Linux Box A and I need to do a HTTP GET/Post from B to say google.com

Is this possible?
Yes, this is possible. There are a bunch of tools to do this, the curl program and associated libraries are a good place to start, but you could also build your own TCP connection with Python and send a POST to port 80.
Jun 6 '07 #2

P: 20
but you could also build your own TCP connection with Python and send a POST to port 80.
In that case, it is going to do a POST from the PC which is running the script. I want to isolate the PC which is running the script, not to perform any such operation.

Anyways CURL seems to be interesting .. let me digg more into it.

Thanks,
Jun 8 '07 #3

Motoma
Expert 2.5K+
P: 3,235
What it sounds like you are trying to do is set up a proxy. Let me know if this is the case.
Jun 8 '07 #4

P: 20
I don't want to setup a Proxy. Ok, so here's the scenario, the PC which is running the script does not have a direct access to the destination where it needs to do the HTTP Post(coz it's on a different subnet which the script PC does not have route to). Rather it has access to a PC - say PC A which in turn has access to the destination where it can do the POST.

So, can PC that is running the script can SSH into PC-A and then perform a HTTP Post on the destination.


Thanks,
--V
Jun 8 '07 #5

Motoma
Expert 2.5K+
P: 3,235
I don't want to setup a Proxy. Ok, so here's the scenario, the PC which is running the script does not have a direct access to the destination where it needs to do the HTTP Post(coz it's on a different subnet which the script PC does not have route to). Rather it has access to a PC - say PC A which in turn has access to the destination where it can do the POST.

So, can PC that is running the script can SSH into PC-A and then perform a HTTP Post on the destination.


Thanks,
--V
A proxy would work well for this. As would a VPN. Or a bridge.

But yes, you can do this. SSH in to the computer which is on the same subnet, then issue your curl command from that.
Jun 8 '07 #6

P: 20
Yup , I can use proxy but I don't want to. Anyways, thanks a lot for the help, I guess CURL would do what I was looking for.

Thanks a bunch!!!!
Jun 8 '07 #7

Motoma
Expert 2.5K+
P: 3,235
Yup , I can use proxy but I don't want to. Anyways, thanks a lot for the help, I guess CURL would do what I was looking for.

Thanks a bunch!!!!
Glad to help out. Come back any time.
Jun 10 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.