Skip to content

LLMNR causes login delay on Debian #5389

Description

@cpach

Description

I have noticed an undesired behaviour when using Lima with Debian 13.

Steps to reproduce

Create a new VM like this: limactl create --name=myvm template:debian-13

Start the VM: limactl start myvm

Run this command and notice how long it takes to complete:

ssh -F $HOME/.lima/myvm/ssh.config lima-myvm /usr/bin/true

Then run almost the same command again, except this time we force pseudo-terminal allocation. Notice how long it takes to complete.

ssh -t -F $HOME/.lima/myvm/ssh.config lima-myvm /usr/bin/true

What I expected to happen

That both commands would finish instantly.

What actually happens

The first command (no pseudo-terminal) finishes instantly.

The second command, where the pseudo-terminal is allocated, has a quite significant delay before completing. On my system it takes about four seconds to complete.

Workaround

In the VM, the file /etc/systemd/resolved.conf.d/00-lima-enable-mdns.conf is created by Lima. Modify it to look like this:

[Resolve]
MulticastDNS=yes
LLMNR=no

Now restart the resolver:

sudo systemctl restart systemd-resolved.service

When Link-Local Multicast Name Resolution is disabled, there is no login delay.

Alternative workaround

Add the following lines to /etc/hosts in the VM:

127.0.0.1 UNKNOWN
::1 UNKNOWN

Why the delay happens

It seems like sshd sets the string UNKNOWN as the client hostname. Then it tries to resolve that hostname, an operation which obviously fails after a time-out. I don’t know why the issue only occurs for interactive sessions.

Suggestion for permanent solution

One possible solution could be to add the LLMNR=no directive permanently. I’m not sure what side-effects it might have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingguest/debianGuest: Debian

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions