tramp

trampを使用すれば、emacsでリモートファイルを編集(Diredも!)するコトが出来る。
こんな便利な機能があったなんて。。今まで知らなかったorz

ssh接続


C-x C-f /ssh:user@foo.jp:/path/too/file

sudo編集


C-x C-f /sudo:root@localhost:/path/too/file

ssh + sudo


C-x C-f /multi:ssh:user@foo.jp:sudo:root@localhost:/path/to/file