Failed to connect to debian 8: Incompatible ssh peer (no acceptable kex algorithm),

Hi,

My Ansible version is 1.9, it works for debian 7, centos 6 and centos 7, but I have got errors to ping debian 8 “No handlers could be found for logger “paramiko.transport” FAILED => FAILED: Incompatible ssh peer (no acceptable kex algorithm)” . I can actually ping and ssh connection to the debian 8 machine, I thought Ansible is using simple ssh to connect hosts, why it stuck on python paramiko (anyway, the paramiko 1.15.1 is installed in the debian 8 machine)?

Searching from Internet suggested to change default connection type from default smart to ssh_alt, but I’ve got “unsupported connection type: ssh_alt”. What are the connection types it supports for using -c?

Appreciate your advice to fix that .

Thank you.

Regards,

hce

http://docs.ansible.com/ansible/intro_configuration.html#transport

I believe ssh_alt was a brief and temporary dev measure done a year and a half ago during the development of Ansible 1.5.

Did you force ssh in your playbook to see if that resolves the issue?

Are you running from an OS X machine? in some cases ansible defaults
to paramiko because of issues with OS X's ssh.

Also paramiko only needs to be installed on the 'master' as on the
target machines the ssh server would not change.

As for the message, my guess is that your local version of paramiko is
a bit old and that debian8 only allows newer/stronger methods of
authentication that your version of paramiko does not support.

Thanks Brian and Timothy, the master machine is running on centos 6.5, the paramiko version was 1.7.5. After installing the latest version paramiko from the source, the problem is resolved.

But I am still not quite clear how the paramiko could cause the problem. I looked at the ansible source, if conn_type == ‘smart’: conn_type = ‘ssh’, seems the default connection type smart is using ssh, isn’t?

For a year since I start to use ansible, my perception is always that ansible is purely using ssh connection that what I told everyone as well, now I feel guilty to mislead others :-).

smart means "use ssh if it is new enough or not causing problems on
this platform, otherwise use paramiko"