appleboy / scp-action

GitHub Action that copy files and artifacts via SSH.
https://github.com/marketplace/actions/scp-command-to-transfer-files
MIT License
1.14k stars 134 forks source link

No matching key exchange algorithm found #100

Open xpertimage opened 1 year ago

xpertimage commented 1 year ago

I am getting this error when attempting to connect to a Cisco device: ERROR:root:Error connecting to 146.40.134.4: No matching key exchange algorithm found, sent curve25519-sha256,curve25519-sha256@libssh.org,curve448-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,ecdh-sha2-1.3.132.0.10,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group17-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256@ssh.com,diffie-hellman-group14-sha1,rsa2048-sha256 and received diffie-hellman-group1-sha1

Here is the python code: ''' async with asyncssh.connect(hostname, username=username, password=password, known_hosts=None, encryption_algs="+aes256-cbc") as conn: result = await conn.run('show version')

config = result.stdout

            # return True, config
            print(".", end ="",flush=True)
            return True

''' I tried adding the diffie-hellman-group1-sha1 in the encryption_algs but I guess I don't know how because I kept getting errors. From the documentation it looks like I should be able to add multiple algos as a list but cannot get it to work.