Friday, March 25, 2011

Editing files remotely

  1. See previous post about key exchange and get_source_machine
  2. Install FUSE and SSHFS.
  3. Ideally, mount the remote directories you're interested to the same path on your Mac. Most recently I've used:
    sshfs mihaip@snowberry.local:/D \
        /D \
  4. Add the following to your .bashrc:
    bbedit() {
      for arg in "$@"
        readlink -fn $arg
        echo -n " "
      done | xargs ssh mihaip@$source_machine /usr/local/bin/bbedit