Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Paramiko Help

Reply
Thread Tools

Paramiko Help

 
 
Frank Ruiz
Guest
Posts: n/a
 
      06-24-2009
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!
 
Reply With Quote
 
 
 
 
Jon Clements
Guest
Posts: n/a
 
      06-24-2009
On Jun 24, 10:01*pm, Frank Ruiz <(E-Mail Removed)> 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')
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Help On Paramiko Michael Torrie Python 0 06-19-2012 03:28 PM
Re: [BangPypers] Help On Paramiko Noufal Ibrahim Python 0 06-19-2012 06:30 AM
Re: Paramiko help - processing multiple commands J. Clifford Dyer Python 0 06-25-2009 01:37 PM
Paramiko help - processing multiple commands Frank Ruiz Python 3 06-25-2009 04:16 AM
using paramiko problem? please help me sa6113 Python 0 10-26-2008 12:29 PM



Advertisments