A Chromium browser extension that enables seamless SSH key-based authentication with web sites.
This extension allows users to authenticate with web applications using their existing SSH keys, eliminating the need for separate passwords or authentication tokens for web services that support SSH-based authentication.
- SSH Key Integration: Configure existing SSH private keys for web authentication
- Automatic Challenge Detection: Automatically detects SSH authentication challenges on web pages
- Secure Key Storage: Keys are securely managed within the browser extension context
- Multi-Algorithm Support: Supports RSA, ECDSA, and Ed25519 SSH key algorithms
- Cross-Browser Compatibility: Works with Chrome, Firefox, Safari, and other Chromium-based browsers
-
Clone and Install Dependencies
npm install
-
Build the Extension
npm run build
-
Load in Browser
- Open Chrome/Edge and navigate to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
dist/folder
- Open Chrome/Edge and navigate to
- Watch Mode:
npm run dev- Automatically rebuilds on file changes - Testing:
npm test- Run the test suite - Linting:
npm run lint- Check code style
-
Configure SSH Key
- Click the extension icon in the browser toolbar
- Enter the path to your SSH private key file
- Optionally enter the key passphrase
- Click "Configure Key"
-
Automatic Authentication
- Navigate to a web site that supports SSH authentication
- The extension will automatically detect authentication challenges
- Authentication happens seamlessly in the background
- Background Service: Network monitoring and key management
- Content Script: DOM observation and challenge detection
- Popup Interface: User configuration and status display
- Shared Utilities: Common functionality (logging, crypto, etc.)
- Private keys never leave the background service context
- Challenge-response authentication prevents key exposure
- Secure storage using browser extension APIs
- No external network communication of sensitive data
ssh-auth-extension/
├── src/
│ ├── background/ # Background service worker
│ ├── content/ # Content scripts
│ ├── popup/ # Extension popup UI
│ ├── shared/ # Shared utilities and types
│ └── manifest.json # Extension manifest
├── dist/ # Built extension bundle
├── test/ # Test files
├── memory-bank/ # Project documentation
└── package.json # Node.js dependencies
src/manifest.json- Extension manifest (Manifest V3)src/background/index.ts- Main background servicesrc/content/index.ts- Content script for web pagessrc/popup/index.ts- Popup UI logicwebpack.config.js- Build configurationjest.config.js- Test configuration
GET_STATUS- Get extension statusCONFIGURE_KEY- Configure SSH keyAUTH_CHALLENGE- Handle authentication challenge
{
success: boolean;
error?: string;
status?: any;
response?: any;
}Run the test suite:
npm testTests include:
- Unit tests for utility functions
- Integration tests for component interactions
- Browser automation tests with Puppeteer
- Follow the existing code style and architecture patterns
- Add tests for new functionality
- Update documentation as needed
- Ensure security best practices are maintained
- SSH private keys are handled with extreme care
- Keys never transmitted over network
- Cryptographic operations isolated to secure contexts
- Regular security audits recommended
Apache License - see LICENSE file for details
See CHANGELOG.md for version history and changes.