Paramiko Help

Discussion in 'Python' started by Frank Ruiz, Jun 24, 2009.

  1. Frank Ruiz

    Frank Ruiz Guest

    Apologies.. Python newb here.. switching from perl to python.. so
    please forgive if this is a dumb question.

    I am using the paramiko module and have some global variables defined.

    i.e.

    hostname = ' 10.10.10.10'
    sshport = '22'

    I am then trying to pass this variable into the client connect method -

    client = paramiko.SSHClient()
    client.load_system_host_keys()
    client.connect(hostname, sshport, root)

    I also have public key setup between source and destination host, so
    not sure if this will work, but trying to jump one hurtle at at time.

    So it seems like the values past to the connect method are taken at
    face value based on the error message I am seeing:

    TypeError: an integer is required

    Any help is much appreciated.

    Thanks!
     
    Frank Ruiz, Jun 24, 2009
    #1
    1. Advertisements

  2. Frank Ruiz

    Jon Clements Guest

    On Jun 24, 10:01 pm, Frank Ruiz <> wrote:
    > Apologies.. Python newb here.. switching from perl to python.. so
    > please forgive if this is a dumb question.
    >
    > I am using the paramiko module and have some global variables defined.
    >
    > i.e.
    >
    > hostname = ' 10.10.10.10'
    > sshport = '22'
    >
    > I am then trying to pass this variable into the client connect method -
    >
    > client = paramiko.SSHClient()
    > client.load_system_host_keys()
    > client.connect(hostname, sshport, root)
    >
    > I also have public key setup between source and destination host, so
    > not sure if this will work, but trying to jump one hurtle at at time.
    >
    > So it seems like the values past to the connect method are taken at
    > face value based on the error message I am seeing:
    >
    > TypeError: an integer is required
    >
    > Any help is much appreciated.
    >
    > Thanks!


    wild guess: should sshport = 22 (instead of '22')
     
    Jon Clements, Jun 24, 2009
    #2
    1. Advertisements

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. Greg Lindstrom

    Using Paramiko

    Greg Lindstrom, Apr 19, 2005, in forum: Python
    Replies:
    0
    Views:
    581
    Greg Lindstrom
    Apr 19, 2005
  2. loial
    Replies:
    0
    Views:
    436
    loial
    Jun 21, 2007
  3. dmorilha

    Paramiko performance doubts...

    dmorilha, Sep 1, 2007, in forum: Python
    Replies:
    0
    Views:
    476
    dmorilha
    Sep 1, 2007
  4. Tarun Kapoor

    Paramiko/SSH blues....

    Tarun Kapoor, Jan 16, 2008, in forum: Python
    Replies:
    0
    Views:
    449
    Tarun Kapoor
    Jan 16, 2008
  5. Guilherme Polo

    Re: paramiko

    Guilherme Polo, Jan 16, 2008, in forum: Python
    Replies:
    8
    Views:
    651
    Guilherme Polo
    Jan 16, 2008
  6. sa6113
    Replies:
    0
    Views:
    367
    sa6113
    Oct 26, 2008
  7. Frank Ruiz
    Replies:
    3
    Views:
    2,604
    Noah Dain
    Jun 25, 2009
  8. sagar varule
    Replies:
    6
    Views:
    371
    Joshua Landau
    Aug 11, 2013
Loading...