Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Paramiko Help (http://www.velocityreviews.com/forums/t689018-paramiko-help.html)

Frank Ruiz 06-24-2009 09:01 PM

Paramiko Help
 
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!

Jon Clements 06-24-2009 09:04 PM

Re: Paramiko Help
 
On Jun 24, 10:01*pm, Frank Ruiz <frank.r...@gmail.com> 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')


All times are GMT. The time now is 07:45 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.