Surendranatha Reddy T
Surendranatha Reddy T

Reputation: 294

unpack requires a buffer of 4 bytes error at ssh.connect(ip, username=user_name)

I am able to connect ssh server with command line like ssh [email protected], but unable to connect using paramiko libray, i am using SSH key instead of password, below is the code.

Sample code:

import paramiko    
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
vm_ip = service_client.get_vm_settings().vm_ip #10.33.37.116
vm_user_name = service_client.get_vm_settings().vm_user_name #telesim
ssh.connect(vm_ip, username=vm_user_name) # Error here: unpack requires a buffer of 4 bytes
logging.warn('---ssh connection done--->')

I see the error unpack requires a buffer of 4 bytes at ssh.connect().

What can be the issue, how can i fix this?

Thanks.

Upvotes: -3

Views: 37

Answers (0)

Related Questions