qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] block/ssh:Allow blockdev-add for ssh


From: Kevin Wolf
Subject: Re: [Qemu-devel] [Qemu-block] block/ssh:Allow blockdev-add for ssh
Date: Thu, 29 Sep 2016 13:36:35 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 29.09.2016 um 13:22 hat Daniel P. Berrange geschrieben:
> On Thu, Sep 29, 2016 at 12:42:34PM +0200, Kevin Wolf wrote:
> > Am 29.09.2016 um 10:07 hat Richard W.M. Jones geschrieben:
> > > On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote:
> > > > Hi all,
> > > > 
> > > > I was trying to convert SSH driver to support 'blockdev-add' and so
> > > > far I have tried to figure out what the struct 'BlockdevOptionsSsh' in
> > > > block-core.json should look like,
> > > > 
> > > > { 'struct': 'BlockdevOptionsSsh',
> > > >   'data': { 'tcp': 'InetSocketAddress',
> > > >              'path': 'str' } }
> > > > 
> > > > Naive question but I have to ask, Am I missing something?
> > > > 
> > > > As far as I know, ssh only supports 'tcp' right? So using
> > > > 'InetSocketAddress' should be good enough. (like the TODO says)
> > > > 
> > > > I had a discussion with Kevin about this and he thinks, maybe
> > > > 'SocketAddress' can be used too because the restriction comes from the
> > > > qemu block driver rather than the backend. He advised me to get an
> > > > opinion on this one from the maintainers of SSH.
> > > 
> > > I have no idea.
> > 
> > I searched the net a bit and it seems that SSH over Unix domain sockets
> > isn't a thing. So it might actually be okay to restrict the QEMU block
> > driver to TCP, too, and therefore use InetSocketAddress.
> 
> SSH over UNIX sockets isn't common, but it is possible. eg say you want
> to connect to a remote machine that isn't directly acessible. You might
> use SSH tunnelling to setup a local UNIX domain socket that is connected
> to the remote machine eg
> 
>    ssh -L /tmp/catbus-sock:catbus.mydomain.com:22 domokun
> 
> Now, connecting to the UNIX domain socket /tmp/catbus-sock would in
> fact forward traffic to the remote TCP server.
> 
> This isn't specific to SSH really - any network protocol could be tunnelled
> in this way, so from that POV there is value in all the network block
> drivers being able to accept UNIX domain socket addresses.

But the ssh client doesn't seem to support connection to that Unix domain
socket, even if it would be possible to support in theory. And probably
none of the SSH libraries that we consider to use support it either (but
I haven't checked that).

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]