Issue
I'm trying to test my ansible script from my local using cygwin. The server I'm trying to connect is failing with ssh connection with following error
Unable to negotiate with port <##>: no matching host key type found. Their offer: ssh-rsa
But I'm able to login with following ssh option ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa user@server
I'm not sure how to pass this parameter to the ansible command in Cygwin.
I tried the following, but it's not working.
ansible-playbook -i '/cygdrive/c/Test/repository/inventory/envk' -e configure_ldap test.yaml -k -K --ssh-common-args='-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa user1@server' --user user1
I'm not sure how to pass parameter to 'ssh-common-args'. Please help.
Solution
create a file named config in your ~/.ssh directory and put this in it
host server
user user
HostKeyAlgorithms=+ssh
PubkeyAcceptedKeyTypes=+ssh-rsa
then try: ssh server
once that works you can just connect with no special parameters needed
Answered By - Carl Andrews Answer Checked By - Willingham (WPSolving Volunteer)