3 ms·
sshfs! When I want to work with a server, I very often use "sshfs <servername>:<remote_dir> <local_path>" to mount it to my local drive. (By default <remote_di
by llimllib 15y ago
sshfs!
When I want to work with a server, I very often use "sshfs <servername>:<remote_dir> <local_path>" to mount it to my local drive. (By default <remote_dir> is your remote home directory, so you can omit it if that's what you want).
Then you avoid all that mucking around with ssh while working. Probably a bit more inefficient, but you can use rsync if you're pushing a lot of data around.
Available on homebrew as "brew install sshfs".
- wukkuan 15y agoBe sure to read the info as you install sshfs via homebrew. Getting fuse4x working right requires a couple extra steps.
- pavel_lishin 15y agoI haven't been able to get it running on 10.7.2, although the last time I tried was a month or so ago. Is it actually usable/workable/stable now? (I don't want to clutter my laptop with various versions of PHP, Apache, etc. that I need for work, so I run a VM - as of late, I've been using ~/projects/workProject1 as my working folder, mounting it via VirtualBox's shared folders, but the read/write speed on the VM is pretty atrocious. Which is sometimes great for testing, but not so great when I accidentally type "git status" in the VM instead of the host machine, and wait a full minute before realizing my mistake.)
- llimllib 15y agoWorks great for me on 10.7.2. sshfs --version says: sshfs 2.3.0, fuse4x 0.8.13, FUSE 2.8.6. I just followed the homebrew directions, I don't remember doing anything funky to get it installed.
- BrandonM 15y agoI forgot about sshfs! I don't seem to use it as much anymore, but I first encountered it about 6 years ago and thought it was pretty amazing. There is a downside to sshfs, though, and it's related to the classic Joel on Software post, "The Law of Leaky Abstractions" (http://www.joelonsoftware.com/articles/LeakyAbstractions.html http://www.joelonsoftware.com/articles/LeakyAbstractions.htm...). A relevant quote from that article is: Abstractions fail. Sometimes a little, sometimes a lot. There's leakage. Things go wrong. It happens all over the place when you have abstractions. It sucks to be using your editor of choice to modify a file mounted on an sshfs filesystem and have something not quite work right. Something as simple as having the latency be higher than the local filesystem can make saves (and even autosaves) ruin the user experience. And you're pretty well hosed when the connection drops; you're almost guaranteed to lose at least some work. That is why these days I tend to avoid sshfs and simply SSH+screen to a remote machine, where I can then run vim using a .vimrc file that matches the one on my home machine. I get exactly the same editing system no matter where I'm logged in, and instead of hiding connection problems somewhere that you can't control, it's very clear what will happen when a disconnection occurs. Of course, if it's across a local or very reliable network, all of my arguments disappear and sshfs is an excellent tool.
- vacri 15y agoScreen is vital enough for me that I've modified the MOTD on my servers to include a reminder to use it (I don't log into them that often)
- antihero 15y agoUsing gvfs from Nautilus is also quite an easy and effective way to do this.