Paramiko Help

F

Frank Ruiz

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!
 
J

Jon Clements

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')
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top