Utvikler tips

english

When developing different applications throughout the week, it is completely natural that we also run into various technical issues along the way.

Personally, I use Codium, which is a telemetry-free version of VS Code, on my Linux machines running Pop!_OS and Manjaro. To work efficiently, I normally push changes through Git and deploy them to the server that way. However, sometimes I simply want to log directly into the server and make quick changes to files in the codebase — especially when working on staging servers or development environments.

This became a problem on a server I was working with on Cloudways. I could not find any official solution from Cloudways, nor could I find any published workaround written by others. Because of that, I decided to publish the solution here so that other developers can more easily find a working method without wasting unnecessary hours troubleshooting the issue.

This article is written in English because the problem itself is international, and if we can help save other developers time, frustration, and headaches, then it makes sense to make the solution as accessible as possible.

Norwegian

Når vi utvikler ulike applikasjoner i løpet av ukene, er det helt naturlig at vi også støter på problemer underveis.

Personlig bruker jeg Codium, som er en telemetrifri versjon av VS Code, på Linux-maskinene mine med Pop!_OS og Manjaro. For å jobbe mest mulig effektivt bruker jeg vanligvis Git for å pushe endringer til serveren, men noen ganger ønsker jeg bare å logge direkte inn på serveren og gjøre raske endringer i kildekoden — spesielt når det gjelder staging-servere eller testmiljøer.

Dette ble et problem på en server jeg jobbet mot hos Cloudways. Jeg fant verken noen offisiell løsning fra Cloudways eller noen publisert løsning andre hadde skrevet om. Derfor tenkte jeg å dele løsningen her, slik at andre enklere kan finne frem til en fungerende metode uten å bruke unødvendig mye tid på feilsøking.

Denne artikkelen er skrevet på engelsk siden problemet er internasjonalt, og dersom vi kan spare andre utviklere for både tid og frustrasjon, er det positivt at så mange som mulig kan finne løsningen.

How to Fix VS Code Remote SSH on Cloudways (And the SSHFS Workaround That Actually Works)

If you are trying to connect Visual Studio Code to a Cloudways server using the Microsoft Remote – SSH extension, you have probably run into one of these errors:

Failed to create the remote server's install directory

or:

administratively prohibited: open failed
AllowTcpForwardingDisabled

This guide explains why VS Code Remote SSH often fails on Cloudways hosting and shows the workaround that actually works reliably.


The Root Problem

Cloudways restricts SSH access in several ways:

  • VS Code cannot install its remote server into the default $HOME location
  • TCP forwarding is often disabled
  • The SSH user is jailed into a restricted application environment
  • The SFTP root differs from the interactive SSH shell path

The result is that standard VS Code Remote SSH setups fail even when normal SSH access works perfectly.


Step 1 — Verify Normal SSH Access Works

Before touching VS Code, test SSH manually.

Example SSH config:

Host myserver
    HostName YOUR_SERVER_IP
    User YOUR_SSH_USER

Test it:

ssh myserver

If this does not work, VS Code will never work.


Step 2 — Find the Actual Application Path

After connecting through SSH:

pwd

Example output:

/home/ACCOUNT_ID.cloudwaysapps.com/APPLICATION_USER/public_html

This path is important later.


Step 3 — Configure VS Code Remote SSH Properly

Open VS Code User Settings JSON:

Ctrl + Shift + P
Preferences: Open User Settings (JSON)

Add:

{
    "remote.SSH.useLocalServer": false,
    "remote.SSH.useExecServer": false,
    "remote.SSH.lockfilesInTmp": true,

    "remote.SSH.serverInstallPath": {
        "myserver": "/home/ACCOUNT_ID.cloudwaysapps.com/APPLICATION_USER/public_html/.vscode-server"
    }
}

Important:

  • The key "myserver" MUST match the SSH alias in ~/.ssh/config
  • Use the FULL path returned by pwd

Step 4 — Create the VS Code Server Folder

SSH into the server and run:

mkdir -p ~/public_html/.vscode-server

Then:

rm -rf ~/public_html/.vscode-server
mkdir ~/public_html/.vscode-server

This clears broken installs.


Step 5 — Try VS Code Remote SSH

In VS Code:

Remote-SSH: Connect to Host

Select:

myserver

At this point one of two things happens:

Option A — It Works

Great. You are done.

Option B — You Get This Error

administratively prohibited: open failed
AllowTcpForwardingDisabled

or:

TCP port forwarding appears to be disabled

This means Cloudways has disabled SSH forwarding on the server.

At this point, there is nothing more to fix locally.


Why VS Code Remote SSH Fails on Cloudways

VS Code Remote SSH depends on SSH TCP forwarding.

Cloudways often disables:

AllowTcpForwarding
AllowStreamLocalForwarding

Without these options enabled in sshd_config, VS Code Remote SSH cannot function.


Option 1 — Contact Cloudways Support

You can ask Cloudways support to enable forwarding.

Message example:

Hi,

I am trying to use Visual Studio Code Remote SSH with my Cloudways application user.

The SSH connection itself works correctly, but VS Code fails because TCP forwarding appears to be disabled.

Could you please enable:

AllowTcpForwarding yes
AllowStreamLocalForwarding yes

for my server/application user?

Thanks.

Some users report Cloudways enabling this manually.


Option 2 — The Workaround That Actually Works (SSHFS)

This ended up being the most stable solution.

Instead of using VS Code Remote SSH, mount the Cloudways filesystem locally using SSHFS.

This gives you:

  • live editing
  • instant save
  • local VS Code performance
  • Git support
  • extensions
  • file explorer
  • no Remote SSH dependency

Step 6 — Install SSHFS

On Ubuntu, Pop!_OS, or Debian:

sudo apt install sshfs

Step 7 — Create a Local Mount Folder

Example:

mkdir ~/myproject

Step 8 — Mount the Cloudways Filesystem

THIS is the important part.

Do NOT use the full /home/... path.

Cloudways uses jailed environments, so SSHFS only sees the restricted root.

Use:

sshfs YOUR_SSH_USER@YOUR_SERVER_IP:public_html ~/myproject

Example:

sshfs sshuser@123.123.123.123:public_html ~/myproject

If successful:

ls ~/myproject

You should now see your website files locally.


Step 9 — Open the Mounted Folder in VS Code

code ~/myproject

You now have direct remote editing without VS Code Remote SSH.


Recommended SSHFS Command

For better stability and performance:

sshfs -o reconnect -o cache=yes -o kernel_cache YOUR_SSH_USER@YOUR_SERVER_IP:public_html ~/myproject

Example:

sshfs -o reconnect -o cache=yes -o kernel_cache sshuser@123.123.123.123:public_html ~/myproject

How to Unmount Later

fusermount -u ~/myproject

Optional: Use SSH Keys Instead of Passwords

Generate a key:

ssh-keygen -t ed25519

Copy it:

ssh-copy-id YOUR_SSH_USER@YOUR_SERVER_IP

Then SSH and SSHFS work without passwords.


Final Thoughts

After testing multiple approaches, SSHFS ended up being a cleaner and more stable solution than VS Code Remote SSH for Cloudways servers.

The issue is not VS Code itself — it is Cloudways disabling TCP forwarding and heavily restricting the SSH environment.

If Cloudways eventually enables forwarding for your server, the Remote SSH approach can work. Until then, SSHFS is a reliable workaround that gives almost the same workflow experience.

Hopefully this saves someone else several hours of debugging.

Les videre

Relaterte artikler

May 2026 1 min

tunge dynamiske sider i 2026

Problemet med moderne runtime-baserte løsningerServer-side rendering på hver requestTunge databasequeries og joinsSingle-threaded runtime-modellerKomponenttrær som bygges dynamiskStore CPU- og RAM-spikes under crawler-trafikk

May 2026 1 min

Don’t be this guy

AI kommer til å forandre byråverdenen totalt!

May 2026 1 min

AI som «Force Multiplier»: Hvordan Feit Fisk AS utfordrer de store byråene

For oss er AI en «force multiplier» – en kraftforsterker som lar et lite, effektivt team levere med musklene til et gigantbyrå, uten å miste den personlige oppfølgingen.