mirroring a loop device across an ssh connection

Jason openssh at lakedaemon.net
Sat Dec 2 06:14:50 EST 2006


Jefferson Ogata wrote:
> [not sure what's up with reply-to here; looks like my previous reply
> went only to you]

My fault, I think.  I recently migrated to thunderbird from mutt, and 
when I set up all my aliases (eg openssh at lakedaemon.net), I filled in 
the Reply-To field.  Apparently mindrot's list server doesn't rewrite 
the Reply-To field.  I've since fixed it for this alias.

> 
> On 2006-12-01 18:13, Jason wrote:
>> Jefferson Ogata wrote:
>>> On 2006-12-01 17:35, Jason wrote:
>>>> So far, I've looked at Rex/sfs [1], pseudo-tty programming, and a little 
>>>> of unix domain sockets.  I'm more familiar with network socket 
>>>> programming, though.  My main holdup right now is my lack of familiarity 
>>>> with openssh internals.  If someone could point to the right section of 
>>>> the src tree, perhaps with a nudge towards how to do this securely, it 
>>>> would greatly appreciated.
>>> Take a look at drbd.
>> Thanks, I hadn't stumbled across that yet.  There is only one small 
>> problem with it, which I failed to mention in my initial mail.  I can't 
>> assume I have root access to the remote machine.  I might be able to get 
>> an 'sudo losetup ...' approved, but most likely I'll need to mirror the 
>> file descriptor of the file container over the ssh connection.
>>
>> Currently, for proof of concept, I have root access on the server, but I 
>> may not in the final implementation.
> 
> In that case, fuse is another option that might help, tho I'm not
> certain as I haven't used it.

I just took a quick look at it.  While it operates in userspace, it 
requires the fuse.ko module to be loaded, which would be a root level 
activity, perhaps even a kernel module compile.  I'll take a closer look 
at it this evening.

I'm beginning to think more along the lines of ssh creating a local 
virtual file and passing all operations on it to the remote file. 
Unfortunately, since a file isn't a stream (it's fseek'able), this could 
be difficult.

Jason.


More information about the openssh-unix-dev mailing list