A modern, secure Visual Studio Code extension for file synchronization using SCP protocol.
- TypeScript-based with full type safety
- Modular design with clear separation of concerns
- Secure by default with comprehensive input validation
- Async/await for non-blocking operations
- Input validation prevents path traversal attacks
- Command sanitization prevents injection attacks
- Secure credential storage using VSCode SecretStorage API
- Encrypted connections with SSH2 library
- Automatic sync on save with configurable patterns
- Progress tracking with detailed status updates
- Bidirectional sync (upload/download)
- Batch operations for efficient transfers
- Smart ignore patterns for selective synchronization
- Visual status indicators in status bar
- Progress feedback during operations
- Configuration UI with intuitive forms
- Error handling with clear messages
- Connection testing before operations
- Multiple server support (planned)
- Profile management for different environments
- Credential storage with secure defaults
- Configuration validation with error prevention
- Open VSCode
- Press
Ctrl+Shift+X(orCmd+Shift+Xon Mac) - Search for "vscode-scp"
- Click Install
-
Configure Connection:
- Open Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type "vscode-scp: Config"
- Enter your server details
- Open Command Palette (
-
Test Connection:
- Command Palette: "vscode-scp: Test Connection"
-
Start Syncing:
- Save files to auto-upload
- Or use "vscode-scp: Local->Remote" for full sync
{
"host": "your-server.com",
"port": 22,
"user": "username",
"remotePath": "/remote/path",
"ignore": [".git", ".vscode", "node_modules"],
"uploadOnSave": true,
"syncMode": "upload"
}| Option | Type | Default | Description |
|---|---|---|---|
host |
string | - | Server hostname or IP |
port |
number | 22 | SSH port |
user |
string | "root" | SSH username |
remotePath |
string | "/root" | Remote destination path |
ignore |
string[] | [".git",".vscode"] | Files to ignore |
uploadOnSave |
boolean | true | Auto-upload on save |
syncMode |
string | "upload" | Sync mode: upload/download/bidirectional |
| Command | Description |
|---|---|
vscode-scp.config |
Open configuration panel |
vscode-scp.local2remote |
Sync all files to remote |
vscode-scp.testConnection |
Test server connection |
vscode-scp.showLogs |
Show extension logs |
vscode-scp.downloadFile |
Download specific file |
vscode-scp.uploadFile |
Upload specific file |
vscode-scp.toggleSync |
Toggle auto-sync |
vscode-scp.showStatus |
Show extension status |
- Path validation prevents directory traversal
- Command sanitization prevents injection attacks
- File filtering prevents unwanted access
- Secure storage using VSCode SecretStorage
- No plain text passwords in configuration
- SSH key support for key-based authentication
- Optional credential prompts when needed
- SSH2 library for secure connections
- Timeout protection prevents hanging
- Connection pooling for efficiency
- Automatic cleanup of idle connections
npm install
npm run compilenpm run testnpm run lintnpm run packagesrc/
├── core/ # Core functionality
│ ├── ConnectionManager.ts
│ ├── ConfigManager.ts
│ └── FileSyncManager.ts
├── security/ # Security features
│ ├── PathValidator.ts
│ └── CredentialManager.ts
├── ui/ # User interface
│ ├── StatusBarController.ts
│ └── ConfigurationPanel.ts
├── utils/ # Utilities
│ └── Logger.ts
├── types/ # Type definitions
│ └── index.ts
└── extension.ts # Main extension entry
-
Connection Failed
- Check server address and port
- Verify SSH access from command line
- Check firewall settings
-
Authentication Failed
- Verify username and password
- Check SSH key format
- Ensure password/SSH key is stored
-
File Upload Failed
- Check file permissions
- Verify remote directory exists
- Check ignore patterns
- Open Command Palette
- Run "vscode-scp: Show Logs"
- Check output panel for detailed information
- 🚀 Complete rewrite from JavaScript to TypeScript
- 🔐 Enhanced security with input validation
- 📁 Modern async file operations
- 🎨 Improved user interface
- ⚙️ Better configuration management
- 📊 Real-time progress tracking
- 🔒 Secure credential storage
- Basic file synchronization
- Simple configuration
- Legacy security model
- Fork repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Apache License Version 2.0
- Issues: GitHub Issues
- Documentation: Wiki
- Discussions: GitHub Discussions
Thank you for using VSCode SCP Extension! 🚀
Prerequisites for use: Use the ssh command to transfer the key of you computer to the server, so that you can login without password.
ssh-copy-id -i ~/.ssh/id_rsa
- Bring up the command pallet (Ctrl+Shift+P or Cmd+Shift+P on Mac) and run the below command: vscode-scp: Config
- change the parameters to the appropriate values for your system.
{
"host": "LocalHost",
"port": 22,
"user": "root",
"ignore":[".git",".vscode"],
"remotePath": "/root",
"uploadOnSave": true
}
| Command | Description |
|---|---|
| vscode-scp: Config | Generate Config Template |
| vscode-scp: Local->Remote | Sync the file from local to remote |
Initial release of vscode-scp
Enjoy!