open remote file locally?

Doran L. Barton fozz at iodynamics.com
Wed Mar 21 01:46:55 MDT 2007


Not long ago, Wade Preston Shearer proclaimed...
> >BTW, I don't know if you've used scp, but here is the basic push and
> >pull usage.
> 
> Yeah, that's what I have been doing (using SCP… I love SCP). Thanks  
> for all of the other thoughts everyone.

If you're not a vim user, the 'netrw' vim plugin suggestion is kind of
useless to you. In this case, I would strongly recommend going the sshfs
route. The only time the poor network connection is going to be an issue is
when you're navigating the filesystem and when you read/write files.
Otherwise, there is no activity over the SSH connection. 

On relatively recent Fedora Core, the fuse-sshfs package is availble via
the "extras" repository:

    # yum -y install fuse-sshfs

I'm sure other distros have a similar process. 

Then you'll need to add yourself to the 'fuse' group so you can mount fuse
filesystems:

    # gpasswd -a fuse YOURUSERNAME

Now, as you and not as root, create a directory to serve as the mountpoint
and then mount the remote directory. This is the real beauty of FUSE
plugins like sshfs: Normal non-privileged users can mount filesystems.
Mounting filesystems is a task traditionally reserved for superusers.

    $ mkdir foo
    $ sshfs user at remote.system.name:/var/www

If you have public key authentication set up, then you won't have to put in
a password. It will just mount automagically.

Now you can navigate to a file via the mounted remote directory and edit it:

    $ cd foo/docs/contct
    $ gedit index.html

When you're all done, you can use 'fusermount' to unmount the sshfs
filesystem:

    $ fusermount -u foo

Enjoy.

-=Fozz

-- 
fozz at iodynamics.com is Doran L. Barton, president/CTO, Iodynamics LLC
Iodynamics: IT and Web services by Linux/Open Source specialists
 "Blind woman gets new kidney from dad she hasn't seen in years"
    -- Headline seen in a newspaper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20070321/272fd83e/attachment.bin 


More information about the PLUG mailing list