🗝️ ssh-keygen

A simple, friendly VS Code extension to generate SSH key pairs in your workspace's .vscode
folder.
✨ Compatible with VS Code's SFTP extension by Natizyskunk (generates proper sftp.json format utilizing your generated SSH Private Key).
🚀 Features
- ✅ Four intelligent commands to fit any workflow
- ✅ Generate ed25519 (recommended) or RSA (2048/4096) keys
- ✅ Consistent naming:
{hostname}-{username}-{keytype}
format for organization
- ✅ Smart validation that skips key generation if valid keys already exist
- ✅ Automatic
sftp.json
generation/update when needed
- ✅ Only prompts for missing information to streamline the process
- ✅ Option to copy the public key to your clipboard for immediate use
- ✅ User-friendly and flexible for any SFTP workflow
- ✅ Cross-platform support with helpful installation guidance
🌴 Installation
Install from the Visual Studio Code Marketplace.
Or search in VS Code:
SSH Key Generator by scrocker
🅥 Usage
- Open the Command Palette (
Ctrl+Shift+P
or Cmd+Shift+P
).
- Choose one of four commands based on your needs:
🔧 Complete Setup (Recommended for new projects)
> SSHKEYGEN: Generate SSH Key Pair & Create or Update SFTP Config
- Choose key type (ed25519, RSA 2048, RSA 4096)
- Prompts for host, username, and optional remote path (only if not already in existing sftp.json)
- Automatically generates keys AND creates or updates sftp.json
- Perfect for setting up a new SFTP connection
🗝️ Keys Only (For flexibility)
> SSHKEYGEN: Generate SSH Key Pair Only
- Choose key type (ed25519, RSA 2048, RSA 4096)
- Enter hostname and username for smart naming
- Generates keys without touching sftp.json
- Great for Git, other servers, or manual SFTP setup
⚙️ Config Only (Smart Discovery)
> SSHKEYGEN: Create or Update SFTP Config Only
- Finds existing SSH keys in
.vscode
folder that use the {hostname}-{username}-{keytype}
format
- Reads hostname and username from key filenames automatically
- Validates key pairs and shows status in selection list
- Only prompts for missing information (usually just remote path)
- Perfect when you already have keys or want to reconfigure
🔐 Passphrase Management (For existing keys)
> SSHKEYGEN: Add/Update Passphrase for Existing Keys
- Discovers existing SSH keys in your workspace
- Add, change, or remove passphrases on existing keys
- Choose storage method: store in config (plaintext) or prompt on each connection
- Automatically updates SFTP configuration to match passphrase settings
- Perfect for enhancing security or changing authentication methods
- Follow the prompts and optionally copy your public key to clipboard when done!
Note: This extension generates keys locally and updates configuration files - it never attempts to connect to remote servers.
❤ Support
If you find this extension helpful, consider buying me a coffee!

🌴 Contributing
Issues and pull requests are welcome!
- Fork this repo
- Clone and install dependencies
- Make your changes
- Submit a PR
🗝️ License
@MIT(LICENSE)