0

I'm trying to connect from a laptop (computer1) to a host (remote1). On computer1 I have user1 on the host I have a different user (user2). Both systems are running Debian, the remote1 system is a clean install of Debian Buster.

The error I'm receiving is the following:

Unable to connect to libvirt.

End of file while reading data: sh: 1: nc: not found: Input/output error

Verify that the 'libvirtd' daemon is running
on the remote host.

Libvirt URI is: qemu+ssh://[email protected]/system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 904, in _do_open
    self._backend.open(self._do_creds_password)
  File "/usr/share/virt-manager/virtinst/connection.py", line 148, in open
    open_flags)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 105, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: End of file while reading data: sh: 1: nc: not found: Input/output error

I can ssh with user 1 from computer 1 to remote1 with:

user1@computer1:~$ ssh [email protected]

and I'm prompted with a password request. I also tried setting up passwordless login using private-public key and that works simply ssh-ing but trying virt-manager I get the error.

As soon as I try:

user1@computer1:~$ virt-manager -c 'qemu+ssh://[email protected]/system'

I get the error.

As it doesn't matter if I'm using public key or password authentication (I get the error in both scenarios) I reverted back to password authentication.

On remote1 I only have the following in /etc/ssh/sshd_config:

Port 22
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
AcceptEnv LANG LC_*
Subsystem       sftp    /usr/lib/openssh/sftp-server

In /var/log/auth.log I can't seem to find a failed authentication.

Any idea/suggetion on what this is and why?

End of file while reading data: sh: 1: nc: not found: Input/output error

I'm new to Linux and sys-admin so after 3 days of tries and constant googling I'm at a loss.

1
  • 1
    I totally don't know how virt-manager works under the hood, yet nc: not found suggests something tries to use nc and the executable cannot be found. If the setup really misses nc then try to add (install) it. Where? I don't know because it's not clear for me if nc: not found comes from the local or the remote system. Ensuring nc is available on both ends seems a good strategy. Also keep in mind there are at least two implementations; it's not clear which one is preferred or strictly required. Maybe it will work with any. Commented Mar 16, 2021 at 18:43

1 Answer 1

1

After insuring that the libvirtd daemon is indeed running, install nc (netcat) on the server to fix this error, as Kamil surmised in the comment above.

I was given the option of gnu-netcat or openbsd-netcat on Arch Linux and had to use the openbsd version, since the gnu version apparently does not support the '-U' option, which virt-manager appears to require.

Thanks to Kamil for putting me on track to solve this exact issue!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .