From: "Richard W.M. Jones" <rjones@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v4] block: Add support for Secure Shell (ssh) block device.
Date: Tue, 9 Apr 2013 08:30:44 +0100 [thread overview]
Message-ID: <20130409073044.GG1461@rhmail.home.annexia.org> (raw)
In-Reply-To: <CAJSP0QW=+DyxegNaCLHuXeZM-+0kz70rLe-gte58hAG+kOFzOw@mail.gmail.com>
On Mon, Apr 08, 2013 at 10:21:44PM +0200, Stefan Hajnoczi wrote:
> On Mon, Apr 8, 2013 at 4:58 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > On Mon, Apr 8, 2013 at 3:05 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
> > From what I can see libssh2 does not support loading .ssh/config.
>
> I was told that sshfs *does* handle .ssh/config. Turns out that sshfs
> spawns "ssh -s sftp" to get a SFTP subsystem channel. Then it
> directly implements the SFTP application protocol.
>
> This way they don't need to link against libssh2. They spawn ssh with
> a socketpair on stdin/stdout. They send/receive SFTP messages
> directly.
Indeed, as I mentioned in an earlier message, sshfs implements the
complete SFTP stack itself and uses an external ssh process.
It's up to 5 times as much code to do so:
sshfs-fuse-2.4$ wc -l *.c
589 cache.c
3930 sshfs.c
18 sshnodelay.c
4537 total
qemu/block$ wc -l ssh.c
914 ssh.c
I don't think having an entire SFTP stack inside qemu would help.
> I just hit a libssh2 limitation. In my .ssh/config I have:
> NoHostAuthenticationForLocalhost yes
>
> This stops ssh from complaining when I hope to another host through an
> ssh tunnel (the host key wouldn't match localhost).
I'm using the ssh configuration attached for tunnelling through
another host. It doesn't require toggling
'NoHostAuthenticationForLocalhost', and so is safer because it still
does host key checking.
I think a better and simpler way to solve this is simply to allow URLs
like:
ssh://localhost/path?host_key_check=no
which is the same as NoHostAuthenticationForLocalhost (ie don't do any
host checking on this connection).
Even better would be to let people specify the key:
ssh://localhost/path?host_key_check=aa:bb:cc:dd:ee:ff
This means that management applications can parse .ssh/config if they
feel like doing that.
Rich.
----------------------------------------------------------------------
My ssh tunnelling configuration:
Host tunnelled-host
PreferredAuthentications publickey,keyboard-interactive,password
ProxyCommand ssh -T -o ForwardAgent=yes proxy nc %h %p
Host proxy
HostName proxy.example.com
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
next prev parent reply other threads:[~2013-04-09 7:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 15:57 [Qemu-devel] [PATCH v4] block: Add support for Secure Shell (ssh) block device Richard W.M. Jones
2013-03-27 15:57 ` Richard W.M. Jones
2013-03-28 10:47 ` Stefan Hajnoczi
2013-03-28 11:16 ` Richard W.M. Jones
2013-03-28 13:29 ` Stefan Hajnoczi
2013-04-03 22:14 ` Richard W.M. Jones
2013-04-08 11:37 ` Stefan Hajnoczi
2013-04-08 13:01 ` Richard W.M. Jones
2013-04-08 13:05 ` Richard W.M. Jones
2013-04-08 14:58 ` Stefan Hajnoczi
2013-04-08 20:21 ` Stefan Hajnoczi
2013-04-09 7:30 ` Richard W.M. Jones [this message]
2013-04-09 12:56 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130409073044.GG1461@rhmail.home.annexia.org \
--to=rjones@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).