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. Advertising

  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. 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. sa6113
    Replies:
    0
    Views:
    275
    sa6113
    Oct 26, 2008
  2. Frank Ruiz
    Replies:
    3
    Views:
    1,788
    Noah Dain
    Jun 25, 2009
  3. J. Clifford Dyer
    Replies:
    0
    Views:
    637
    J. Clifford Dyer
    Jun 25, 2009
  4. Noufal Ibrahim

    Re: [BangPypers] Help On Paramiko

    Noufal Ibrahim, Jun 19, 2012, in forum: Python
    Replies:
    0
    Views:
    222
    Noufal Ibrahim
    Jun 19, 2012
  5. Michael Torrie

    Re: Help On Paramiko

    Michael Torrie, Jun 19, 2012, in forum: Python
    Replies:
    0
    Views:
    247
    Michael Torrie
    Jun 19, 2012
Loading...

Share This Page