Open multiple VS Code windows to x1-mnl-pph-n1 simultaneously
VS Code Remote-SSH uses the Host alias as a unique connection identifier.
By creating multiple aliases pointing to the same server, each VS Code window
gets its own independent SSH session.
| mnl | → Primary window |
| mnl-2 | → Second window |
| mnl-3 | → Third window |
| mnl-4 | → Fourth window |
# x1-mnl-pph-n1 — Multiple VS Code windows (alias method)
# Ref: https://stackoverflow.com/questions/78418458
# --- Primary connection ---
Host mnl
HostName 100.120.250.96
User xadmin
IdentityFile ~/.ssh/id_ed25519
StrictHostKeyChecking no
ServerAliveInterval 60
ServerAliveCountMax 3
# --- Second VS Code window ---
Host mnl-2
HostName 100.120.250.96
User xadmin
IdentityFile ~/.ssh/id_ed25519
StrictHostKeyChecking no
ServerAliveInterval 60
ServerAliveCountMax 3
# --- Third VS Code window ---
Host mnl-3
HostName 100.120.250.96
User xadmin
IdentityFile ~/.ssh/id_ed25519
StrictHostKeyChecking no
ServerAliveInterval 60
ServerAliveCountMax 3
# --- Fourth VS Code window ---
Host mnl-4
HostName 100.120.250.96
User xadmin
IdentityFile ~/.ssh/id_ed25519
StrictHostKeyChecking no
ServerAliveInterval 60
ServerAliveCountMax 3
Windows: C:\Users\<YOU>\.ssh\config
macOS/Linux: ~/.ssh/config
Or in VS Code: Ctrl+Shift+P → "Remote-SSH: Open SSH Configuration File"
Copy the block above (or download the file) and paste it at the end of your existing SSH config.
Don't remove your existing Host x1-mnl-pph-n1 entry — these are additional aliases.
The config references ~/.ssh/id_ed25519.
If you use a different key, update the IdentityFile line in each alias.
Check with: ls ~/.ssh/id_ed25519*
Ctrl+Shift+P → "Remote-SSH: Connect to Host"
Select mnl for window 1, mnl-2 for window 2, etc.
Each gets its own independent session.
| Device | OS | Config Path |
|---|---|---|
| xm | macOS | ~/.ssh/config |
| mold | macOS | ~/.ssh/config |
| 8eatpraylove | Windows | C:\Users\<YOU>\.ssh\config |
| scotty | Windows | C:\Users\<YOU>\.ssh\config |
| ryzen | Windows | C:\Users\<YOU>\.ssh\config |
| asusflip | Windows | C:\Users\<YOU>\.ssh\config |
| engel | Windows | C:\Users\<YOU>\.ssh\config |
# Download and append in one command
curl -sL https://ssh.proud.ph/ssh-config-snippet.txt >> ~/.ssh/config
# Verify
grep -c "^Host mnl" ~/.ssh/config
# Download and append in one command
Invoke-WebRequest -Uri "https://ssh.proud.ph/ssh-config-snippet.txt" `
-OutFile "$env:TEMP\ssh-snippet.txt"
Add-Content "$env:USERPROFILE\.ssh\config" (Get-Content "$env:TEMP\ssh-snippet.txt")
# Verify
Select-String -Path "$env:USERPROFILE\.ssh\config" -Pattern "^Host mnl"
The workspace file lives on the server (/var/www/www.code-workspace).
Use code --remote to connect and open it — works from any machine, any OS.
# Open VS Code → connect via SSH → load full workspace
code --remote ssh-remote+mnl /var/www/www.code-workspace
# Open a SECOND simultaneous window
code --remote ssh-remote+mnl-2 /var/www/www.code-workspace
# Third / fourth window
code --remote ssh-remote+mnl-3 /var/www/www.code-workspace
code --remote ssh-remote+mnl-4 /var/www/www.code-workspace
Prerequisite: SSH aliases must be set up first (see above).
The code command must be in your PATH.
# Add to ~/.zshrc (one-time setup, then run: source ~/.zshrc)
alias mnl='code --remote ssh-remote+mnl /var/www/www.code-workspace'
alias mnl2='code --remote ssh-remote+mnl-2 /var/www/www.code-workspace'
alias mnl3='code --remote ssh-remote+mnl-3 /var/www/www.code-workspace'
alias mnl4='code --remote ssh-remote+mnl-4 /var/www/www.code-workspace'
# Then just type: mnl (opens window 1)
# mnl2 (opens window 2)
echo -e '\n# MNL workspace shortcuts\nalias mnl="code --remote ssh-remote+mnl /var/www/www.code-workspace"\nalias mnl2="code --remote ssh-remote+mnl-2 /var/www/www.code-workspace"\nalias mnl3="code --remote ssh-remote+mnl-3 /var/www/www.code-workspace"\nalias mnl4="code --remote ssh-remote+mnl-4 /var/www/www.code-workspace"' >> ~/.zshrc && source ~/.zshrc && echo "Done! Type: mnl"
# Run once to create shortcuts in your PowerShell profile:
@'
# MNL workspace shortcuts
function mnl { code --remote ssh-remote+mnl /var/www/www.code-workspace }
function mnl2 { code --remote ssh-remote+mnl-2 /var/www/www.code-workspace }
function mnl3 { code --remote ssh-remote+mnl-3 /var/www/www.code-workspace }
function mnl4 { code --remote ssh-remote+mnl-4 /var/www/www.code-workspace }
'@ | Add-Content $PROFILE
. $PROFILE
# Then just type: mnl (opens window 1)
# macOS/Linux — download and use
curl -sL https://ssh.proud.ph/mnl-open.sh -o ~/mnl-open.sh && chmod +x ~/mnl-open.sh
# Usage:
~/mnl-open.sh # window 1
~/mnl-open.sh 2 # window 2
~/mnl-open.sh 3 # window 3
Host x1-mnl-pph-n1 entry continues to work unchanged100.120.250.96id_rsa instead of id_ed25519, update each IdentityFile line