Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kitchen fails to ssh to Ubuntu 22 azure VM #275

Open
alpana17 opened this issue Jul 2, 2024 · 3 comments
Open

Kitchen fails to ssh to Ubuntu 22 azure VM #275

alpana17 opened this issue Jul 2, 2024 · 3 comments

Comments

@alpana17
Copy link

alpana17 commented Jul 2, 2024

Here is my kitchen.yml
`driver:
name: azurerm
retryable_tries: 120

transport:
name: sftp
ssh_key: /home/jenkins/ssh/kitchen_azure
username: ubuntu
connection_retry_sleep: 30
connection_retries: 20

provisioner:
name: chef_zero
product_name: chef
product_version: 16.10.8
max_retries: 4
wait_for_retry: 200
retry_on_exit_code:
- 1
always_update_cookbooks: true

verifier:
name: inspec

platforms:

  • name: azureubuntu-22
    driver:
    name: azurerm
    subscription_id: 'eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    location: 'southeastasia'
    machine_size: 'Standard_A2'
    retry_limit: 10
    image_urn: Canonical:0001-com-ubuntu-server-jammy:22_04-lts:22.04.202404090
    username: ubuntu
    vm_name: ifcicd-imageFactoryKitchenInstance
    vnet_id: /subscriptions/exxxxxxxxxxxxxxxxx/resourceGroups/IxxxxxxxxNext/providers/Microsoft.Network/virtualNetworks/ifVnet
    subnet_id: Imagefactorynextsubnet
    public_ip: true
    vm_tags:
    Name: 'ifcicd-[img_fact_ubuntu22::ubuntu-22]kitchen instance for chef converge'
    created-by: 'Kitchen'
    data_disks:
    - lun: 0
    disk_size_gb: 4
    transport:
    name: sftp
    ssh_key: /home/jenkins/ssh/kitchen_azure
    username: ubuntu
    connection_retry_sleep: 30
    connection_retries: 20

suites:

  • name: default
    run_list:
    • 'recipe[so-falcon_sensor::default]'
    • 'recipe[IF_Ubuntu-22_Azure::default]'
      attributes:
      IF_Ubuntu-22_Azure:
      account_id: <%= ENV['AWS_ARTIFACTORY_TOKEN_USER'] %>
      api_key: <%= ENV['AWS_ARTIFACTORY_TOKEN'] %>
      org_custom_configs:
      edr:
      default_cid: <%= ENV['FALCON_CID'] %>
      so-falcon_sensor:
      default_cid: <%= ENV['FALCON_CID'] %>
      do_falcon_cleanup: false
      artifactoy:
      user: <%= ENV['AWS_ARTIFACTORY_TOKEN_USER'] %>
      api_key: <%= ENV['AWS_ARTIFACTORY_TOKEN'] %>
      verifier:
      inspec_tests:
      • test/smoke/default`

Getting error:
[SSH] connection failed, retrying in 30 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user ubuntu@>)
Is Ubuntu-22 supported??

@Stromweld
Copy link
Contributor

what version of test-kitchen and kitchen-azure are you running? Can you also see which net-ssh gem version you have. Version below 7.x doesn't support the newer ssh algorithms newer servers are supporting and they dropped support for the default rsa keys with less than 1024 bits.

@alpana17
Copy link
Author

alpana17 commented Jul 3, 2024

Using
test-kitchen 2.7.2
kitchen-azurerm 1.4.0
net-ssh 6.1.0

Please suggest

@Stromweld
Copy link
Contributor

you'll need to upgrade your gems to fix your issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants