HTTP GET/POST on remote machines

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • indiarocks
    New Member
    • Feb 2007
    • 20

    #1

    HTTP GET/POST on remote machines

    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?
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by indiarocks
    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.

    Comment

    • indiarocks
      New Member
      • Feb 2007
      • 20

      #3
      Originally posted by Motoma
      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,

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        What it sounds like you are trying to do is set up a proxy. Let me know if this is the case.

        Comment

        • indiarocks
          New Member
          • Feb 2007
          • 20

          #5
          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

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Originally posted by indiarocks
            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.

            Comment

            • indiarocks
              New Member
              • Feb 2007
              • 20

              #7
              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!!!!

              Comment

              • Motoma
                Recognized Expert Specialist
                • Jan 2007
                • 3236

                #8
                Originally posted by indiarocks
                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.

                Comment

                Working...