Skip to content

[Bug]: dstack server may fall back to interactive auth methods when connecting to instances/jobs #3715

@un-def

Description

@un-def

Steps to reproduce

  1. Create an SSH fleet.
  2. Make sure password and/or keyboard-interactive auth methods are enabled on the instance side.
  3. Comment out the dstack key in authorized_keys

Actual behaviour

When the publickey method fails, runner_ssh_tunnel falls back to the next method (e.g., password), asks for a password, waits for 15 seconds, and fails.

Expected behaviour

runner_ssh_tunnel should immediately fail on any user interaction request.

dstack version

0.20.15

Server logs

[11:06:29] DEBUG    dstack._internal.server.background.pipeline_tasks.base:342 Processing instances item cc9e0e59-4b3c-459a-8277-fc060095a4cd
debian@192.168.122.75's password:
[...]
[11:06:44] DEBUG    dstack._internal.core.services.ssh.tunnel:180 SSH tunnel to debian@192.168.122.75 did not open in 15 seconds
           WARNING  dstack._internal.server.background.pipeline_tasks.instances.check:279 Instance vm-0 check: reachable=False health_status=HEALTHY message='SSH or tunnel error'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions