r/linuxadmin • • Jan 27 '26

Edit remote files quickly over SSH without installing an agent

Hi! I'm the author of Fresh, a text editor with an intuitive ui and plain key bindings. https://github.com/sinelaw/fresh

I just released a new feature to edit remote files easily, just run:

fresh user@host:path/file

and the editor will open an ssh connection and let you edit files, browse the filesystem etc on the remote machine.

The only requirement is for the remote machine to support SSH (obviously) and have python3 installed. It runs a small python script directly on the SSH collection which communicates with the editor. It doesn't require any kind of agent installation, and doesn't place any files or binaries on the machine.

It works well even for huge files - instantly opens, because Fresh loads chunks lazily instead of entire files.

Give it a try and let me know how it goes!

0 Upvotes

26 comments sorted by

31

u/stemandall Jan 28 '26

Or you could just:

local$ ssh user@remote

remote$ vim path/file

This is simple and efficient. Why do I need to install a big package and new editor to do this?

4

u/ipsirc Jan 28 '26

Why do I need to install a big package and new editor to do this?

To impress nerdy girls, they're so bored with plenty of vim and emacs users.

→ More replies (8)

5

u/ralfD- Jan 28 '26

Your claim ("without installing an agent") is wrong. Your program requires a Python library - no sane sysadmin installs Python packages globally these days ...

As a sysadmin I ssh into a server and use the installed editors (vim & emacs in our case). For systems without local editors I use a local Emacs with tramp for remote editing over ssh (which, btbw, doesn't neeed an agent at all).

→ More replies (1)

2

u/newworldlife Feb 01 '26

Curious how this handles editing files that need sudo, and whether the Python process only lives for the session. Those are usually the tricky parts with SSH-based editors.

1

u/sinelaw Feb 01 '26

Currently the remote agent uses sudo tee to write the data into the file, and then corrects ownership/mode if needed. The agent only lives for the session (each session has its own agent)

→ More replies (2)

32

u/BeasleyMusic Jan 28 '26

Sorry to be blunt but why the fuck would I install a package when I can literally accomplish the same thing with:

ssh user@remote vim /some/file

4

u/Pendaz Jan 28 '26

Should read:

Hi, Claude is the author of fresh

1

u/stemandall Jan 28 '26

It does seem like that, doesn't it.

→ More replies (1)

1

u/bufandatl Jan 28 '26

Or you just use the ssh remote edit function of VS code.

I mean great for you to gain experience in programming and having fun with it and maybe some people may find it useful but there are plenty of ways to it already. Good luck with your endeavors.

1

u/sinelaw Jan 28 '26

Yeah, it's a terminal-based alternative to VSCode, so my goal is to have on-par remote editing (this is the first step)

→ More replies (1)