STEP 01Create a key on your own computer
Run this locally, not on the VPS. Choose a passphrase and keep the private key private. Use an existing key if your organization already provides one. Never send the file without .pub to a provider or paste it into AI.
ssh-keygen -t ed25519 -C "my-vps-key"STEP 02Add the public key and verify the server
Install the .pub key through your provider’s supported setup flow or an existing trusted administrative session. Create a non-root account such as deploy. Replace the documentation IP below. Before accepting the first SSH fingerprint, compare it with the server console or another trusted channel.
ssh deploy@203.0.113.10203.0.113.10 is a documentation address. It is not your server.
STEP 03Use an SSH alias
Add an entry to the SSH config on your local computer. Install Microsoft’s Remote - SSH extension in VS Code. Run Remote-SSH: Connect to Host, choose my-vps, then open a folder owned by your deployment user.
Host my-vps
HostName 203.0.113.10
User deploy
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yesSTEP 04Know which machine you are editing
Check the remote indicator in the lower corner and run hostname in the terminal. Changes now affect the remote machine. Use a staging folder or branch instead of editing a live production release. Port forwarding is useful for a private preview; it is not a public deployment.
hostname
pwd
whoamiCOPY → YOUR AI
Take the next step to your AI.
A safe starting prompt for this guide. No secrets. Works with ChatGPT, Claude and other assistants.
Sources and technical documentation
VS Code Remote SSH ↗This recipe is a pattern for the stated prerequisites. Verify project compatibility and your actual server configuration before applying it to a live service.