Closed dendle closed 1 year ago
Hi @dendle we will take a look, thanks
Hello! It is localhost referenced in your logs, it means nothing we can help with, you should amend the ~/.ssh/config
file to accept the specific encryption algorithm as say, described here: https://unix.stackexchange.com/questions/402746/ssh-unable-to-negotiate-no-matching-key-exchange-method-found
Hi! As I've mentioned, its localhost because that is how the ansible proxy adapter works. This works when the pipeline runs on Ubuntu-20.04, and does not work when the pipeline is run on ubuntu-latest (Ubuntu-22.04)
@mikhailkoliada I took time to prepare this in issue to help you find the cause of a potential problem with the new version of ubuntu that is rolling out. I think this is a real issue that will cause problems for your users.
I've had the exact same issue, and could only workaround it using the no_proxy setting so that the ansible provisioner uses the SSH connection created in the communicator and by pass the default ssh proxy.
Description
I have been using ubuntu-latest in my azure devops pipeline that runs packer. I noticed that it had stopped working yesterday (2022/12/13). The error occurred when packer was connecting to an AWS instance of ubuntu.
The SSH session was created successfully, but when packer tries to set up a proxy adapter for ansible to use, it fails to connect with the following error:
no matching host key type found. Their offer: ssh-rsa
This happens if the target ubuntu instance is 20.04 or 22.10.This problem goes away if I specify
Platforms affected
Runner images affected
Image version and build link
20221212.1
Is it regression?
yes, last working image version 20221125.1
Expected behavior
I expected the azure devops hosted runner to be able to execute the packer pipeline without ssh errors.
Actual behavior
An ssh error is encountered when attempting to connect to Ubuntu 20.04 or Ubuntu 22.10. When the packer pipeline runs, it creates an AWS EC2 instance of ubuntu, and attempts to connect to it using SSH. Whilst the initial SSH connection works, when using packer with ansible, there is an SSH "proxy adapter" that is used to connect to the instance.
When ansible attempts to connect via this proxy adapter, the following ssh error occurs: Short version:
Unable to negotiate with 127.0.0.1 port 34915: no matching host key type found. Their offer: ssh-rsa
Long version:Repro steps
pool: vmImage: ubuntu-latest
steps:
linux_agent.pkr.hcl:
playbook.yml: