Bug 1309578 - qemu-io: Can't read data with ssh protocol
qemu-io: Can't read data with ssh protocol
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.3
x86_64 Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Ping Li
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-18 02:49 EST by xiagao
Modified: 2017-02-16 06:29 EST (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-16 06:29:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description xiagao 2016-02-18 02:49:22 EST
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@127.0.0.1

2. trying ssh localhost without password
#ssh root@127.0.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 10:03:45 EDT
(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@127.0.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 06:29:37 EST
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.