SabaKore

Home / Articles / AI guides

Build a Development Environment on a VPS with Remote-SSH in Cursor or VS Code

This explains how Remote-SSH keeps only the editor window on your machine and leaves the real work to the VPS, and what to watch on the server side.

Ren, a junior infrastructure engineer

Ren

What changes when you connect Cursor or VS Code to a VPS with Remote-SSH? Is it the same as just logging in over SSH?
Procura, a cloud AI robot who explains

Procura

It looks similar but it's different. With Remote-SSH, only the editor window stays on your machine, and opening and saving files and running extensions are all handed to a small program on the VPS. It looks like your usual editor, but what's actually running is inside the VPS.

What's good about it

  • You can open heavy projects without using your own PC's storage or CPU
  • Whoever on the team connects gets the same environment and the same behavior
  • Even if you replace your PC, you can resume work just by reconnecting
Ren, a junior infrastructure engineer

Ren

But it's touching a faraway server, so it must feel sluggish...
Procura, a cloud AI robot who explains

Procura

It usually doesn't feel that heavy. Typing and drawing the screen are handled by the editor on your machine, so it tolerates some delay. Parts that query the server each time, like suggestion popups, are easier to notice as lag when the connection is slow, though.

What matters on the server side

What's easy to miss is that the moment you connect the editor, another program starts running permanently on the VPS. On top of that, analysis programs that provide code completion and warnings start up for each project. If you only estimate the memory needed to run the project itself, this share gets left out, and you only notice once things become slow.

  • The larger the project, the more memory the analysis programs use
  • Fast disk reads and writes shorten the time the first analysis takes
  • If you run linters (tools that automatically check how code is written) and type checking at the same time, leave some headroom in the number of cores too

Be careful how widely you expose things

Wilson, the security guard

Wilson

...Even if the Remote-SSH connection itself is protected by keys, people sometimes expose a browser-facing server to the outside to check how things work. If it's visible from anywhere, that suits me just fine.
Procura, a cloud AI robot who explains

Procura

Plenty of people do end up exposing a preview server so it's visible directly from outside. If you just want to see the screen during development, keep the server reachable only from inside the VPS and peek at it from your own browser through SSH port forwarding.
  • Don't expose the preview server to the outside. Limit access to connections from inside the VPS
  • Only when you need to look, connect briefly with SSH port forwarding
  • Stick to key authentication, and close ports you don't need once you're done
Ren, a junior infrastructure engineer

Ren

The screen is light, but behind it there are more programs running all the time. And I should be careful how I expose things too.

This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.