[opensuse] Remote files using SSHFS without mounting

I know about SSHFS. I know how to mount using FUSE and all that. This isn't what I'm asking about. I'm asking how to access a file on the command line without mounting. I can run $ scp localfile anton@remotesystem:remotefile What I want to do is that in a general sense, for example $ diff localfile anton@remotesystem:remotefile or $ tail anton@remotesystem:remotefile WITHOUT MOUNTING THE REMOTE FILE SYSTEM! Yes, I've googled and there is a tremendous amount of stuff abut mounting. I got tired of paging through it all. This strikes me as such an obviously and useful mode of operation, surely someone has met this before. -- What is wanted is not the will to believe, but the will to find out, which is the exact opposite. --Bertrand Russell, _Skeptical Essays_ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org

Anton Aylward wrote:
What I want to do is that in a general sense, for example
$ diff localfile anton@remotesystem:remotefile
rsync with suitable options
$ tail anton@remotesystem:remotefile
ssh anton@remotesystem tail remotefile -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org

Dave Howorth said the following on 10/27/2011 08:40 AM:
Anton Aylward wrote:
What I want to do is that in a general sense, for example
$ diff localfile anton@remotesystem:remotefile
rsync with suitable options
$ tail anton@remotesystem:remotefile
ssh anton@remotesystem tail remotefile
I think you are missing my point. You've given specific and non-general alternatives to my two examples. I could come up with any number of examples and we could spend eternity playing pin-pong with them. What I'm looking for is something that threats a file argument to a command - ANY COMMAND - in a general way. With a consistent syntax. For example, the 'diff' should be able to extend to 'diff3': $ diff3 $ARG1 $ARG2 $ARG3 where ARG{123} should be any valid file name syntax. A user who knows how to use diff should be able to keep using diff. Scripts that have diff embedded in them still work even when invoked with a "user@machine:file". The whole point of FUSE is to make the transport transparent. What I'm asking for is to get around the remote mounting. -- Vizzini: INCONCEIVABLE! Inigo: You keep using that word. I do not think it means what you think it means. - The Princess Bride -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org

On 10/27/2011 10:31 AM, Anton Aylward wrote:
Dave Howorth said the following on 10/27/2011 08:40 AM:
Anton Aylward wrote:
What I want to do is that in a general sense, for example
$ diff localfile anton@remotesystem:remotefile
rsync with suitable options
$ tail anton@remotesystem:remotefile
ssh anton@remotesystem tail remotefile
I think you are missing my point. You've given specific and non-general alternatives to my two examples. I could come up with any number of examples and we could spend eternity playing pin-pong with them.
What I'm looking for is something that threats a file argument to a command - ANY COMMAND - in a general way. With a consistent syntax.
For example, the 'diff' should be able to extend to 'diff3':
$ diff3 $ARG1 $ARG2 $ARG3
where ARG{123} should be any valid file name syntax.
A user who knows how to use diff should be able to keep using diff. Scripts that have diff embedded in them still work even when invoked with a "user@machine:file".
The whole point of FUSE is to make the transport transparent.
What I'm asking for is to get around the remote mounting.
The only way I can see is if you teach you shell how to recognize urls, do whatever mounting or ftping or wgetting or smb_clienting etc is implied by the url, and re-writes the command line before executing the command. You might be able to do this, poorly and incompletely, and breaking assumptions the rest of your system knows are supposed to be safe, by writing a custom module in zsh. Have fun with that. Or I suppose you could hack the libc and kernel source to change all file functions to recognize and specially handle urls. Except, http://foo.foo.com/blah is a perfectly valid local filesystem path. You can have a directory named "http:", you can have two "/" next to each other and it means the same as just one, for a reason (think building paths out of variables and one variable may be empty sometimes and sometimes not), even the ?'s and @'s and %'s in a query string are all valid filesystem characters. And these are actually even used sometimes, like mirroring web sites. Your wish is understandable, in the way that lots of ill considered wishes are understandable. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org

On Thursday 27 Oct 2011 08:23:51 Anton Aylward wrote:
I know about SSHFS. I know how to mount using FUSE and all that. This isn't what I'm asking about.
I'm asking how to access a file on the command line without mounting.
I can run
$ scp localfile anton@remotesystem:remotefile
You can do it with the magic of KIO. I haven't tried it outside of an X session and you may need to launch a dbus session if none is running. kioclient copy file:///path/to/localfile sftp://anton@remotesystem:remotefile
What I want to do is that in a general sense, for example
$ diff localfile anton@remotesystem:remotefile
diff <(kioclient cat file:///home/wstephens/foo) <(sftp://anton@remotesystem:remotefile) etc Will -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org

On Thursday 27 Oct 2011 15:27:53 Will Stephenson wrote:
diff <(kioclient cat file:///home/wstephens/foo) <(sftp://anton@remotesystem:remotefile)
Correction, after some behind-the-scenes action: diff <(kioclient cat file:///home/wstephens/foo) <(kioclient cat sftp://anton@remotesystem:remotefile) and you need KDE 4.7 if you want passwordless pubkey authentication via ssh- agent to work. Will -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Anton Aylward
-
Brian K. White
-
Dave Howorth
-
Will Stephenson