最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin3浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论