简体   繁体   中英

Python paramiko elliptic curve

i'm using python 2.7.12 on a ubuntu16.04 trying to use the Paramiko package ( just need remote ssh command execution)

my code is

   import paramiko


    host = "random_host"
    ssh = paramiko.SSHCLient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(host)

and the error i get is:

crypthography.exceptions.UnsupportedAlgorithm: this backend does not support this elliptic curve.

please help

and if there is a better alternative for just remote ssh commands , do tell ( i tried fabric but it still fails when i try to connect)

problem here

1) u are using host in double quotes

Try below code with IP first ,instead of host and let us know if it works

import paramiko 
ssh=paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('192.168.1.26',port=22,username='root',password='default')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM