Making SSH Access Seamless from Windows
In an earlier post, I set up Codex CLI on my home Linux server:
Typing the SSH command every time gets old fast, so I decided to simplify the workflow from my Windows machine.
Quick SSH Access with PowerShell
The simplest approach was to create a shortcut that opens PowerShell and connects directly to the server.
I used:
pwsh.exe -NoExit -Command "ssh username@server_ip"
This launches PowerShell 7 (modern PowerShell) and immediately starts an SSH session.
For convenience, I wrapped this in a small .bat file:
@echo off
pwsh.exe -NoExit -Command "ssh username@server_ip"
Now I can just double-click and I’m instantly connected.
Auto-Start on Windows Login
To take it a step further, I set it to run automatically whenever I log into Windows.
- Press
Win + R - Run:
shell:startup - Drop the shortcut or
.batfile into that folder
Now my SSH session starts automatically on login.
Using VS Code Remote SSH (One-Click Dev Access)
For actual development work, I didn’t want to stay in a terminal. I wanted full IDE access.
The cleanest way to do this is with VS Code Remote – SSH.
First, I added my server to the SSH config:
C:\Users\<your-username>\.ssh\config
Host ubuntu-box
HostName server_ip
User username
Then in VS Code:
- Install the Remote – SSH extension
- Press
Ctrl + Shift + P - Run:
Remote-SSH: Connect to Host - Select
ubuntu-box
After the first connection, VS Code remembers it so it becomes a one-click experience