4 ms·
If you want something in user land and you don't mind emacs there is TRAMP “Transparent Remote (file) Access, Multiple Protocol”. https://www.gnu.org/software/t
by zitterbewegung 3y ago
If you want something in user land and you don't mind emacs there is TRAMP “Transparent Remote (file) Access, Multiple Protocol”. https://www.gnu.org/software/tramp/ https://www.gnu.org/software/tramp/
I use it a lot when I am accessing files from my server on my MacBook Pro .
- Zambyte 3y agoMy favorite thing about using TRAMP is being able to cd to a directory on a remote system, and then cp a file either from my working directory to my local machine (or another remote!), or from my local machine to the current working directory. Before I started using TRAMP, my flow for this was: SSH to a remote system, locate where I want to copy a file to with cd + ls, kill my SSH session, and then scp or rsync the file over, and then usually SSH back into the system.
- kpw94 3y ago> kill my SSH session, and then scp or rsync the file over, and then usually SSH back into the system. Naive question: why the need to kill the ssh session? Can't you just open another terminal window or tab (or tmux/screen tab if that's part of your workflow)
- Zambyte 3y agoThat's also a way to do it. I prefer TRAMP over both ways though.
- jakobson14 3y agoOr just scp from the server, inside the same SSH session. scp works both ways.
- shric 3y agoNot the GP, but I assume it's just because the ssh swssion is no longer needed -- it was only required to locate the file.
- wolletd 3y ago> and then usually SSH back into the system.
- rzzzt 3y agoI usually type ~ followed by ^Z to suspend the session for a quick scp operation, then resume with "fg".
- koito17 3y agoTRAMP is amazing. Whenever I need to edit configuration files or code on a remote server, I get to keep the exact same Emacs setup as if I were doing things locally. There are noticeable delays in opening and saving files on slow connections, but it's good enough that I can't remember the last time I have used nano or vi in a remote server.
- lmm 3y agoCouldn't you use zmodem or something?
- Zambyte 3y agoI am not familiar with zmodem, but maybe.
- qalmakka 3y agoCouldn't you just use sftp?
- Zambyte 3y agoYes. I've never directly used sftp before, but checking the man page it does seem like it would fit the flow I described well.
- halJordan 3y agoIdk when you stopped using scp, but scp has been deprecated, and at least w/openssh, using sftp under the hood for years now. You probably have used it if you've scp'd since 2020.
- Zambyte 3y agoMy point above was that I was making and killing multiple SSH connections to find where I want to copy a file, and then do the copy. Using SCP with an SFTP backend would still do that.
- jlarocco 3y agoFWIW a lot (most?, all?) of Emacs features work transparently with Tramp, including dired, eshell, and magit.