Need help connecting via a remote VPN

Discussion in 'Python' started by The Coca Cola Kid, Jul 19, 2012.

  1. I need to connect to a site/server that's only accessible after logging into
    a remote VPN, then scan a directory for a file pattern and then copy those
    files. I know how to do the latter using glob, and I think I figured out
    how to connect to the VPN using win32ras and got a response that said "302
    Found" but I'm not sure what to do after that. Some people recommended
    using SSH or fabric.api modules, but I couldn't find any examples that
    applied to what I'm trying to do.
     
    The Coca Cola Kid, Jul 19, 2012
    #1
    1. Advertising

  2. The Coca Cola Kid

    Dave Angel Guest

    On 07/18/2012 09:36 PM, The Coca Cola Kid wrote:
    > I need to connect to a site/server that's only accessible after
    > logging into a remote VPN, then scan a directory for a file pattern
    > and then copy those files. I know how to do the latter using glob,
    > and I think I figured out how to connect to the VPN using win32ras and
    > got a response that said "302 Found" but I'm not sure what to do after
    > that. Some people recommended using SSH or fabric.api modules, but I
    > couldn't find any examples that applied to what I'm trying to do.


    Starting a VPN simply makes it possible for IP packets to get to the
    specified machine. You still need to match some protocol that the
    particular remote machine can handle. SSH is probably the most common,
    but there are lots of other possibilities, some standard and some
    custom. So the question is what does the remote machine (server)
    support for file access?

    glob will work if the server supports mounting the remote partition as a
    file system. But there are no guarantees that that's possible. You
    haven't even said what the two operating systems involved are, though I
    can guess that the local machine is some version of Windows.


    --

    DaveA
     
    Dave Angel, Jul 19, 2012
    #2
    1. Advertising

  3. "Dave Angel" wrote in message
    news:...

    >Starting a VPN simply makes it possible for IP packets to get to the
    >specified machine. You still need to match some protocol that the
    >particular remote machine can handle. SSH is probably the most common,
    >but there are lots of other possibilities, some standard and some
    >custom. So the question is what does the remote machine (server)
    >support for file access?
    >
    >glob will work if the server supports mounting the remote partition as a
    >file system. But there are no guarantees that that's possible. You
    >haven't even said what the two operating systems involved are, though I
    >can guess that the local machine is some version of Windows.


    The local machine is running Windows 7. I'm not sure what the other machine
    is running on, but I assume it can handle ssh. If it helps, I usually
    connect to it manually via an https web link, and then after entering my
    user name and password in a Firepass session manager it runs an active-x
    cache cleaner program and will then let me navigate to server B which is
    behind the firewall.
     
    The Coca Cola Kid, Jul 20, 2012
    #3
  4. The Coca Cola Kid

    Dave Angel Guest

    On 07/19/2012 09:41 PM, The Coca Cola Kid wrote:
    > "Dave Angel" wrote in message
    > news:...
    >
    >> Starting a VPN simply makes it possible for IP packets to get to the
    >> specified machine. You still need to match some protocol that the
    >> particular remote machine can handle. SSH is probably the most common,
    >> but there are lots of other possibilities, some standard and some
    >> custom. So the question is what does the remote machine (server)
    >> support for file access?
    >>
    >> glob will work if the server supports mounting the remote partition as a
    >> file system. But there are no guarantees that that's possible. You
    >> haven't even said what the two operating systems involved are, though I
    >> can guess that the local machine is some version of Windows.

    >
    > The local machine is running Windows 7. I'm not sure what the other
    > machine is running on, but I assume it can handle ssh. If it helps, I
    > usually connect to it manually via an https web link, and then after
    > entering my user name and password in a Firepass session manager it
    > runs an active-x cache cleaner program and will then let me navigate
    > to server B which is behind the firewall.


    If the remote machine is Linux, running sshd, and if you have an account
    there, then use scp to copy the file. And if you want to automate it,
    run scp from within python, using the subprocess module. But make sure
    it works manually before bothering to automate it.

    To get ssh on Windows, one approach is to install cygwin.

    If you want more control than subprocess, there are a whole bunch of 3rd
    party ssh libraries for Python. Just google python ssh library to get
    at least 6 on the first page.

    --

    DaveA
     
    Dave Angel, Jul 20, 2012
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Robertson

    How to FTP via VPN to sites on different IP's ?

    Jason Robertson, Nov 25, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    397
    Jason Robertson
    Nov 25, 2004
  2. Jason Robertson
    Replies:
    0
    Views:
    331
    Jason Robertson
    Nov 26, 2004
  3. Tim Meagher
    Replies:
    0
    Views:
    612
    Tim Meagher
    Jun 12, 2005
  4. Jason Robertson

    How to FTP via VPN to sites on different IP's ?

    Jason Robertson, Nov 25, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    212
    Naveen K Kohli
    Nov 26, 2004
  5. Tim Meagher
    Replies:
    0
    Views:
    121
    Tim Meagher
    Jun 12, 2005
Loading...

Share This Page