From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIm9L-0006iw-Jc for qemu-devel@nongnu.org; Thu, 21 Mar 2013 16:31:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIm9G-0004ek-J6 for qemu-devel@nongnu.org; Thu, 21 Mar 2013 16:31:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIm9G-0004eS-AW for qemu-devel@nongnu.org; Thu, 21 Mar 2013 16:31:42 -0400 Date: Thu, 21 Mar 2013 20:31:37 +0000 From: "Richard W.M. Jones" Message-ID: <20130321203137.GH1504@rhmail.home.annexia.org> References: <1363873138-30568-1-git-send-email-rjones@redhat.com> <1363873138-30568-2-git-send-email-rjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] block: Add support for Secure Shell (ssh) block device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel On Thu, Mar 21, 2013 at 08:35:29PM +0100, Stefan Hajnoczi wrote: > On Thu, Mar 21, 2013 at 2:38 PM, Richard W.M. Jones wrote: > > From: "Richard W.M. Jones" > > > > qemu-system-x86_64 -drive file=ssh://hostname/some/image > > > > QEMU will ssh into 'hostname' and open '/some/image' which is made > > available as a standard block device. > > > > You can specify a username (ssh://user@host/...) and/or a port number > > (ssh://host:port/...). > > > > Current limitations: > > > > - Authentication must be done without passwords or passphrases, using > > ssh-agent. Other authentication methods are not supported. (*) > > > > - Does not check host key. (*) > > > > - New remote files cannot be created. (*) > > > > - Uses coroutine read/write, instead of true AIO. (libssh2 supports > > non-blocking access, so this could be fixed with some effort). > > > > - Blocks during connection and authentication. > > > > (*) = potentially easy fix > > > > This is implemented using libssh2 on the client side. The server just > > requires a regular ssh daemon with sftp-server support. Most ssh > > daemons on Unix/Linux systems will work out of the box. > > --- > > block/Makefile.objs | 1 + > > block/ssh.c | 514 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > configure | 47 +++++ > > qemu-doc.texi | 28 +++ > > 4 files changed, 590 insertions(+) > > create mode 100644 block/ssh.c > > Just noticed that libcurl supports sftp. > > Did you try enabling sftp support in block/curl.c? I think you just > need to add CURLPROTO_SFTP to #define PROTOCOLS. Interestingly curl's sftp support is implemented using libssh2. I'll take a look at how easy this will be. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW