Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
Blog

How to Connect to Your VPS Using Visual Studio Code

Use Visual Studio Code’s Remote - SSH extension to connect to a VPS, authenticate securely, install VS Code Server, and edit remote files from the editor.
Length11 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable way to connect is Microsoft’s Remote – SSH extension for Visual Studio Code. First verify that your VPS accepts OpenSSH connections, then test ssh user@hostname locally. In VS Code, run Remote-SSH: Connect to Host…, let VS Code Server install on the VPS, and open the remote project folder. Your editor, integrated terminal, debugging tools, and compatible extensions then work against files on the VPS rather than files on your computer.

What a VS Code VPS connection actually does

Remote – SSH creates an encrypted SSH session from your computer to the virtual private server. VS Code remains the desktop interface, while a small VS Code Server process runs on the VPS. The server handles file operations, language services, terminals, debugging, and other remote-side work; the desktop window displays the results.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is different from copying a project over SFTP and editing a local duplicate. When the connection is active, File > Open Folder selects a directory on the VPS. Commands entered in the integrated terminal run on that VPS, with its users, environment variables, installed runtimes, databases, and game-server files.

Microsoft describes the extension as a way to open a remote folder on a remote machine, virtual machine, or container with a running SSH server while using VS Code’s feature set. For a game server, that means you can edit configuration files, inspect logs, run deployment scripts, and restart services without leaving the editor.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Check the prerequisites before installing anything

Local computer

  • Install a current desktop build of Visual Studio Code.
  • Install an OpenSSH-compatible client. macOS and most Linux distributions include one. Current Windows 10 and Windows 11 installations normally provide OpenSSH through the optional features, and PowerShell can invoke it as ssh.
  • Have the VPS address, SSH username, authentication method, and port if the server does not use the default port 22.
  • Ensure your local network permits outbound SSH traffic. A corporate or school network may block uncommon SSH ports even when the VPS is healthy.

VPS operating system and resources

Microsoft’s Remote – SSH requirements list x86_64 Debian 8 or later, Ubuntu 16.04 or later, and CentOS/RHEL 7 or later. Supported ARM Ubuntu and Raspberry Pi systems are also listed. Windows 10 and Windows Server 2016 or 2019 (1803 or later) can be used when the official OpenSSH Server is enabled.

The remote host needs at least 1 GB of RAM. Microsoft recommends 2 GB of RAM and a two-core CPU, especially when language servers, compilers, or other extensions will run alongside a game server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux packages needed by VS Code Server

On a Linux VPS, the remote account must be able to run /bin/bash and have tar plus either curl or wget. Only glibc-based distributions are currently supported. Alpine Linux uses musl instead of glibc and is not supported by Remote – SSH.

Network access from the VPS

The VPS must accept inbound SSH connections, normally on TCP port 22, through both the provider’s network firewall and the operating system firewall. During first connection, VS Code Server may need outbound HTTPS access to update.code.visualstudio.com and vscode.download.prss.microsoft.com. Installing remote extensions can require additional access to the Visual Studio Marketplace and its content-delivery network.

Prepare the VPS account and SSH service

Use a dedicated, non-root account

Create or use an account intended for administration or deployment, such as deploy, instead of using root for routine editing. Give it ownership or group access to the project directory and only the privileges it needs. If a game service runs under a separate account, keep its files protected and grant the deploy account narrowly scoped access rather than changing everything to world-writable.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Confirm that the SSH daemon is running

The VPS provider may enable SSH automatically, but verify that the server is listening and that the account is allowed to log in. If you changed the SSH port, record the exact value; the port must match the firewall rules and your local SSH configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Allow the connection in both firewalls

Check the provider’s security group or network ACL and the VPS operating-system firewall. A timeout usually means traffic is being dropped before authentication, while an immediate refusal usually means no SSH service is listening on the address and port.

Choose password or key authentication

Method Security and convenience When it fits Recovery considerations
Password Simple to begin, but the password may be requested repeatedly while VS Code opens channels and starts VS Code Server. Short-lived access or a machine where key storage is not practical. You need a working password-reset path through the provider if it is forgotten or disabled.
SSH key pair The private key stays on your computer and the VPS stores only the public key. Microsoft recommends this approach for Remote – SSH. Recurring administration, automation, and production game-server maintenance. Keep a protected backup of the private key or an alternate administrator account; deleting the only key can lock you out.

Generate and install a key

  1. In a local terminal or PowerShell window, run ssh-keygen -t ed25519 -b 4096. Accept the default location or choose a clearly named file such as ~/.ssh/id_ed25519_vps. Set a passphrase; an SSH agent can remember it for the session.
  2. Add the resulting public-key text (the file ending in .pub) to the remote account’s ~/.ssh/authorized_keys. Use your provider’s console, an existing SSH session, or the provider’s documented key-import feature. Do not copy the private-key file to the VPS.
  3. On a Unix-like local system, restrict the private-key permissions with chmod 600 ~/.ssh/id_ed25519_vps. Windows OpenSSH also rejects keys whose ACLs allow broad access; keep the file inside your user profile and remove access for unrelated accounts.
  4. Make sure the remote account’s ~/.ssh directory and authorized_keys file are owned by that account and are not writable by other users.

Test ordinary SSH before involving VS Code

Open a terminal or PowerShell window and run:

ssh user@hostname

Replace user and hostname with the same values you intend to use in VS Code. If you use a nonstandard port, test it explicitly:

ssh -p 2222 user@hostname

For a named private key, add the identity option:

ssh -i ~/.ssh/id_ed25519_vps user@hostname

Accept the host-key prompt only after checking that the address is your VPS. Once logged in, run a harmless command such as whoami or pwd, then exit. Resolve DNS, routing, firewall, username, port, host-key, and key-permission errors at this stage. Remote – SSH uses the same underlying SSH path; an extension reinstall will not fix a command-line connection that already fails.

Install Remote – SSH in Visual Studio Code

  1. Open VS Code and select the Extensions view from the activity bar.
  2. Search for Remote – SSH and install Microsoft’s extension. The Remote Development extension pack is an alternative that includes it.
  3. Reload VS Code if prompted. A remote indicator appears in the lower-left status bar once a session is established.

The extension is free software. Your VPS provider, operating system, and any game-server software remain separate from VS Code licensing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Connect with Remote-SSH: Connect to Host…

  1. Open the Command Palette with F1 or Ctrl+Shift+P on Windows/Linux, or Cmd+Shift+P on macOS.
  2. Run Remote-SSH: Connect to Host….
  3. For a one-time connection, enter the same address you tested, such as user@hostname. If VS Code offers hosts from your SSH configuration, select the named entry instead.
  4. If asked to choose a platform, select the operating system running on the VPS. This determines which VS Code Server build is downloaded.
  5. Complete the password or key-passphrase prompt. VS Code opens a new window and begins installing or starting VS Code Server on the remote machine.
  6. Wait for the installation to finish. The lower-left indicator should show the host name, confirming that the window is remote.
  7. Select File > Open Folder and choose the project directory on the VPS. You can also use Open Workspace for a saved multi-folder workspace.

The first connection can take longer because the server package is downloaded and unpacked. Subsequent connections reuse the remote installation until VS Code updates it or you remove it.

Save a reusable SSH configuration

For a recurring host, use Remote-SSH: Open Configuration File… from the Command Palette, or edit your local SSH configuration file. On macOS and Linux it is normally ~/.ssh/config; Windows OpenSSH commonly uses %USERPROFILE%.sshconfig.

Host my-vps
    User deploy
    HostName 203.0.113.10
    IdentityFile ~/.ssh/id_ed25519_vps

Host is the short name shown in Remote Explorer. User is the remote login account. HostName is the VPS DNS name or IP address. IdentityFile points to the private key on your local computer. If the server listens on another port, add a line such as Port 2222 inside that host block.

Save the file, then run Remote-SSH: Connect to Host… again. The my-vps entry should appear in the host picker and Remote Explorer. A configuration entry prevents typing long addresses repeatedly and keeps the identity file and port consistent for every connection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open and edit remote project files safely

Verify the remote context

Look at the lower-left status bar before editing. It should identify the VPS, not “Local.” Open the integrated terminal with Terminal > New Terminal and run pwd and whoami. The results should show the VPS path and account.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Install extensions in the correct place

Some extensions run locally, while language servers, debuggers, linters, and formatters often need to run on the remote host. When VS Code offers Install in SSH: my-vps, choose that option for tools that must access remote files or runtimes. Check the Extensions view’s “Local – Installed” and “SSH: my-vps – Installed” sections separately.

Use the integrated terminal for server commands

Commands such as package-manager operations, build scripts, log inspection, and service restarts execute on the VPS when the window is connected. Confirm the working directory and account before running destructive commands. A terminal opened in a local VS Code window remains local, so do not rely on the editor window alone to identify where a command will run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Handle permissions deliberately

If a file opens read-only or saving fails, inspect its owner and group on the VPS. Fix ownership or group membership through the server’s normal administration process. Avoid broad chmod 777 changes: they can expose credentials, game-server configuration, and save data to every local account.

Manual host entry versus an SSH config alias

Approach Repeatability Keys and ports Team maintenance
Type user@hostname in the host picker Fast for a one-off connection, but values must be re-entered and remembered. Additional prompts or command-line options may be needed for a private key or nonstandard port. Each person maintains their own connection details.
Use a named SSH config entry One selectable alias appears in Remote Explorer and the host picker. The entry can hold an identity file and port alongside the user and host name. A documented template makes onboarding and server moves easier, while each person still keeps private keys locally.

For a VPS you connect to regularly, the alias is usually the less error-prone option. Do not place private keys or passphrases in a shared configuration file.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the failures that occur most often

“Connection timed out”

  • Confirm the VPS is powered on and that the DNS record resolves to its current IP address.
  • Check the provider firewall, operating-system firewall, and SSH port. Port 22 is normal, but your server may use another port.
  • Test from the same computer with ssh -p PORT user@hostname. If that command also times out, the problem is network reachability rather than VS Code.
  • Some networks block outbound SSH. Try an approved network or an administrator-approved port rather than repeatedly reinstalling the extension.

“Permission denied” or repeated password prompts

  • Verify the username; a valid key for one account will not authenticate as another account.
  • Check that the public key is on one uninterrupted line in authorized_keys and that the file belongs to the target account.
  • Confirm the local private-key path in the SSH config and tighten its permissions.
  • Run the tested command with verbose output, such as ssh -v user@hostname, to see which key the client offers. Fix the ordinary SSH login before retrying Remote – SSH.

Host-key warning after an IP change

A changed VPS address or rebuilt server can produce a host-key mismatch. Do not bypass the warning blindly. Verify the new fingerprint through your provider’s console or another trusted channel, then remove the obsolete entry from your local known_hosts file and reconnect so the new key can be recorded.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

VS Code Server cannot download or start

  • Check outbound HTTPS access from the VPS to update.code.visualstudio.com and vscode.download.prss.microsoft.com.
  • Ensure /bin/bash, tar, and either curl or wget are installed and executable.
  • Check available disk space and memory. The documented minimum is 1 GB RAM; Microsoft recommends 2 GB and two CPU cores.
  • Remove a partially installed server only if you understand the impact on other VS Code sessions, then reconnect to trigger a clean installation.

Alpine Linux or another non-glibc distribution

Remote – SSH currently supports glibc-based Linux systems, not Alpine Linux. Move the project to a supported distribution or use a different remote-editing method that does not require VS Code Server on that host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ARM extension errors

The core connection can succeed while an extension fails because it contains x86-native code. Install an ARM-compatible release, choose a language tool that supports the VPS architecture, or keep that particular tool running locally while editing remote files.

The wrong folder or local files are open

Check the status-bar host label and run pwd in the integrated terminal. Reconnect through the host picker if the window is local, then use File > Open Folder again. Opening a local workspace before connecting does not move it to the VPS.

Security practices for a long-running VPS connection

  • Prefer key-based authentication with a passphrase and protect the private key from other local users.
  • Use a dedicated account and least-privilege filesystem permissions. Keep root login disabled unless your operational policy explicitly requires it.
  • Restrict inbound SSH at the provider firewall to trusted source addresses where practical, and keep the VPS operating system and SSH server patched.
  • Review the host fingerprint when connecting to a newly created or rebuilt VPS.
  • Do not paste private keys, API tokens, database passwords, or game-server secrets into source files or shared workspace settings.
  • Back up important configuration and save data separately from the VPS. Remote editing is not a backup strategy.

Disconnect, reconnect, and end a session

To stop working remotely, choose File > Close Remote Connection. This closes the remote VS Code window; it does not shut down the VPS or stop a game server. Reopen VS Code, select the saved host from Remote-SSH: Connect to Host…, and choose the project folder to resume.

If a session becomes unresponsive, close the remote window and reconnect after checking whether a long-running terminal command is still active. Disconnecting the editor does not automatically terminate processes launched in a persistent service manager, screen session, or terminal multiplexer.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A dependable connection checklist

  1. The VPS is running, DNS or the IP address is correct, and the SSH port is allowed by both firewalls.
  2. The remote account can log in through ordinary OpenSSH.
  3. The local computer has Visual Studio Code and an OpenSSH-compatible client.
  4. Remote – SSH is installed from the Extensions view.
  5. A tested password or protected private key is available.
  6. The VPS meets the operating-system, glibc, Bash, tar, curl/wget, memory, and CPU requirements.
  7. Remote-SSH: Connect to Host… reaches the VPS and completes VS Code Server installation.
  8. The status bar identifies the VPS before you edit files or run commands.
  9. File > Open Folder selects the intended remote project directory.

Once those checks pass, Visual Studio Code provides a direct working view of the VPS: files stay on the server, terminal commands use the server’s environment, and the SSH connection can be reproduced reliably through a saved host entry.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.