3 ms·
Honest question: doesn't sshfs solve this problem? I've never understood the appeal of TRAMP, mounting the remote resources seems like a much better and less fi
by smabie 6y ago
Honest question: doesn't sshfs solve this problem? I've never understood the appeal of TRAMP, mounting the remote resources seems like a much better and less finicky solution.
- znpy 6y agoYou might not have the required host permission to mount a filesystem or you might not have sshfs at all (think about gnu emacs on windows). Tramp is agnostic in most things (well, you need an ssh client at least).
- contravariant 6y agoCalling tramp a solution for windows is somewhat iffy though. So far I don't think there's an easy way to simply get it to work on windows (the path handling seems to forbid tramp-like paths on windows, which messes with things quite considerably).
- znpy 6y agoMeh, it worked well enough for me when I had to use it on windows 7 first and 10 later (using putty as ssh client).
- disgruntledphd2 6y agoYeah, you can get it to work with putty, but it's nowhere near as reliable as from Mac/Linux to server (and to be fair, network issues make it a less than optimal solution if you have a choice). These days I just tmux on the server, open emacs and hack away (as long as you can install things on the server).
- deleted 6y ago[deleted]
- dan-robertson 6y agoTramp works for non-ssh remote terminals. Also it leads to remote commands running automatically rather than running commands locally against a remote fs.
- jlg23 6y agoTRAMP works well over slow connections and, if told to save temporary files locally, deals with connection loss pretty well.
- chriswarbo 6y agoThere are some semantics differences, e.g. if a remote buffer is open then `shell-command` (M-!) will run commands on the remote machine and `shell` will open a terminal which is logged in to the remote machine. I run all my terminals in Emacs, so I use these a lot (my init.el wraps the latter in a function which invents new buffer names shell-1, shell-2, etc.). TRAMP also feels faster to me; I presume it's due to background jobs adjusting their casual I/O usage when TRAMP is detected, like writing backup/lock files, scanning directories for VCS info, etc. which has high latency on SSHFS. I also like using `/sudo:root@localhost:/foo` for editing local files with different user permissions (plus the same command and terminal behaviour as with SSH)
- ProfDreamer 6y agomulti-hops[0] should probably be mentioned as well. Using those one can for example open a file using sudo via ssh: /ssh:you@remotehost|sudo:remotehost:/path Doing any further actions on a file opened that way also applies the hops there as well. For the example above opening a shell or running a shell-command would run those through sudo on the remote host. [0]: https://www.gnu.org/software/emacs/manual/html_node/tramp/Ad_002dhoc-multi_002dhops.html https://www.gnu.org/software/emacs/manual/html_node/tramp/Ad...
- kqr 6y agoIt's worth mentioning that this is not limited to SSH followed by sudo. It can also be used to edit remote files through a bastion host, by just adding more SSH hops to the file path.