RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1309578 - qemu-io: Can't read data with ssh protocol
Summary: qemu-io: Can't read data with ssh protocol
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.3
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Ping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 07:49 UTC by xiagao
Modified: 2017-02-16 11:29 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-16 11:29:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ssh auth info (4.65 KB, application/x-gzip)
2016-02-18 07:49 UTC, xiagao
no flags Details

Description xiagao 2016-02-18 07:49:22 UTC
Created attachment 1128153 [details]
ssh auth info

Description of problem:
Setting login localhost without password through ssh protocal, then error occured when reading data through ssh protocal by qemu-io.
error info: qemu-io: can't open device ssh://127.0.0.1/home/qemu-kvm/tests/qemu-iotests/scratch/t.qcow2: no host key was found in known_hosts: Failed to parse known hosts file (libssh2 error code: -46)

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-108.el7.x86_64
kernel-3.10.0-327.el7.x86_64
libssh2-1.4.3-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Setting login localhost without password through ssh protocal
#ssh-keygen
three times "Enter" key
#ssh-copy-id root.0.1

2. trying ssh localhost without password
#ssh root.0.1
can login without password

3. create qemu image
/usr/bin/qemu-img create -f qcow2 -o compat=1.1 /home/qemu-kvm/tests/qemu-iotests/scratch/t.qcow2 128M

4. qemu-io read date by ssh protocal
/usr/bin/qemu-io -c 'read -P 0xa 0 128M' ssh://127.0.0.1/home/qemu-kvm/tests/qemu-iotests/scratch/t.qcow2


Actual results:
qemu-io: can't open device ssh://127.0.0.1/home/qemu-kvm/tests/qemu-iotests/scratch/t.qcow2: no host key was found in known_hosts: Failed to parse known hosts file (libssh2 error code: -46)


Expected results:
no error

Additional info:
1. libssh2-1.4.3-10.el7.x86_64 --> also hit it
2. ssh auth info is in attachment

Comment 4 Richard W.M. Jones 2016-04-18 14:03:45 UTC
(In reply to xiagao from comment #0)
> 4. qemu-io read date by ssh protocal
> /usr/bin/qemu-io -c 'read -P 0xa 0 128M'
> ssh://127.0.0.1/home/qemu-kvm/tests/qemu-iotests/scratch/t.qcow2

You need to use:

  ssh://root.0.1/....

in the command above.

The error, however, indicates a slightly different problem:

> error info: qemu-io: can't open device
> ssh://127.0.0.1/home/qemu-kvm/tests/qemu-iotests/scratch/t.qcow2: no host
> key was found in known_hosts: Failed to parse known hosts file (libssh2
> error code: -46)

This could be because your ssh key uses ecdsa-sha2-nistp256, which probably
libssh2 doesn't support, since it only supports a rather small subset of
the features of OpenSSH.  We really need to rewrite the qemu ssh driver so
it uses the ssh command instead of libssh2.  In fact, by sheer coincidence
someone else asked me about this today.

----

Note that we don't support customers using the ssh driver in qemu directly.  They can
only use it through virt-v2v (to convert ancient RHEL 5 Xen guests to run on KVM).
Unless this could happen for a customer using virt-v2v from RHEL 5 Xen then it
wouldn't be considered to be a bug.  For example, most likely RHEL 5 doesn't support
ecdsa and never will.

Comment 6 Richard W.M. Jones 2017-02-16 11:29:37 UTC
I'm closing this because using the ssh driver directly
from the qemu command line is not supported.


Note You need to log in before you can comment on or make changes to this bug.