VSay Remote Machines - VS Code Extension
Connect to your VSay managed machines directly from VS Code with WebSocket tunneling or SSH!
Features
- 🖥️ Machine Explorer - View all your VSay machines in the sidebar
- 🌐 WebSocket Tunneling - Connect without SSH using existing agent connection (NEW!)
- 🔌 SSH Connection - Traditional Remote-SSH connection support
- 📊 Resource Monitoring - See CPU, memory, and disk usage
- 🔄 Auto-Refresh - Keep your machines list up to date
- 💻 Integrated Terminal - Open SSH terminal directly in VS Code
- 📋 Copy IP - Quick copy machine IP addresses
- ⚡ Auto VS Code Server - Automatically installs VS Code server on remote machines
Prerequisites
- VS Code version 1.80.0 or higher
- VSay Backend running and accessible
- VSay Agent installed on remote machines
- (Optional) Remote-SSH Extension - Only needed for SSH-based connections
Installation for Development/Testing
Step 1: Install Dependencies
cd /Users/yesveer/Downloads/Yesveer-Dev/Laptops\ on\ Internet/vsay-vscode-extension
npm install
Step 2: Compile TypeScript
npm run compile
Step 3: Test in VS Code
Open the extension folder in VS Code:
code /Users/yesveer/Downloads/Yesveer-Dev/Laptops\ on\ Internet/vsay-vscode-extension
Press F5 to open a new VS Code window with the extension loaded
In the new window, you'll see "VSay Machines" in the Activity Bar
- Open VS Code Settings (
Cmd+, on macOS)
- Search for "VSay"
- Set VSay: Api Url to your backend URL (default:
http://localhost:8080)
Step 5: Login
- Click the VSay icon in the Activity Bar
- Click "Login to VSay" or use command palette (
Cmd+Shift+P) → "VSay: Login to VSay"
- Enter your email and password
Usage
View Machines
- Click the VSay icon in the Activity Bar
- All your machines will be listed with:
- Status indicator (green = online, red = offline)
- IP address
- OS information
- Resource usage (hover to see details)
Connect to Machine (WebSocket - Recommended)
- Click the radio tower icon (📡) next to an online machine
- VS Code server will be automatically installed on the remote machine
- Connection established via existing WebSocket tunnel (no SSH configuration needed!)
Benefits:
- No SSH setup required
- Uses existing vsay-agent connection
- Automatic VS Code server installation
- Works through firewalls (uses existing agent tunnel)
Connect to Machine (SSH - Alternative)
- Click the plug icon (🔌) next to an online machine
- Enter SSH username when prompted
- VS Code will open a new window connected via Remote-SSH
Note: Requires SSH access and Remote-SSH extension
Open Terminal
- Click the terminal icon next to an online machine
- Enter SSH username when prompted
- An integrated terminal will open with SSH connection
Refresh Machines
- Click the refresh icon in the view title
- Or use command palette → "VSay: Refresh Machines"
Add New Machine
- Click the + icon in the view title
- Browser will open to your VSay portal's Add Machine page
Configuration
Access settings via Cmd+, → Search "VSay"
Available Settings
- vsay.apiUrl - VSay API server URL (default:
http://localhost:8080)
- vsay.autoRefresh - Auto-refresh machines list (default:
true)
- vsay.refreshInterval - Refresh interval in seconds (default:
30)
Development Commands
# Compile TypeScript
npm run compile
# Watch mode (auto-compile on save)
npm run watch
# Lint code
npm run lint
# Package extension
npm run package
Building for Production
To create a .vsix file for distribution:
# Install vsce (VS Code Extension Manager)
npm install -g @vscode/vsce
# Package the extension
npm run package
This creates a .vsix file that can be installed in VS Code:
- Go to Extensions view
- Click "..." menu → "Install from VSIX..."
- Select the generated
.vsix file
SSH Configuration
The extension automatically manages SSH configuration in ~/.ssh/config:
- Each machine is added as
Host vsay-{agent_id}
- Configurations include IP, username, and SSH options
- Manual SSH connections are also possible:
ssh vsay-{agent_id}
Troubleshooting
Extension Not Loading
- Check VS Code version (should be 1.80.0+)
- Run
npm run compile to rebuild
- Check Output panel (View → Output → Select "VSay Remote Machines")
Login Failed
- Verify API URL in settings
- Check backend is running
- Verify credentials are correct
SSH Connection Failed
- Ensure Remote-SSH extension is installed
- Check machine is online
- Verify SSH access to machine
- Check
~/.ssh/config for correct entries
Machines Not Showing
- Click refresh button
- Check you're logged in
- Verify API connection in settings
Architecture
src/
├── extension.ts # Main entry point, activation logic
├── authService.ts # Authentication with VSay backend
├── machineProvider.ts # TreeView data provider for machines
└── sshService.ts # SSH connection handling
Contributing
- Make changes in
src/ directory
- Run
npm run compile to build
- Press
F5 to test in Extension Development Host
- Test all features before submitting
License
MIT
Support
For issues and feature requests, please contact the VSay team.