{"id":24961483,"url":"https://github.com/dforsber/ssh-backend-connector","last_synced_at":"2026-02-21T10:30:51.714Z","repository":{"id":273877358,"uuid":"921165369","full_name":"dforsber/ssh-backend-connector","owner":"dforsber","description":"Establish and maintain SSH port forwarded secure tunnel to backends","archived":false,"fork":false,"pushed_at":"2025-02-12T10:54:14.000Z","size":395,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T14:58:08.386Z","etag":null,"topics":["security-tools","ssh-client","ssh-tunnel","vpn"],"latest_commit_sha":null,"homepage":"https://www.boilinginsights.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dforsber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-23T13:14:22.000Z","updated_at":"2025-02-05T13:54:43.000Z","dependencies_parsed_at":"2025-01-23T14:23:43.510Z","dependency_job_id":"065cde81-815c-45f9-9b1b-9e4a868a9e09","html_url":"https://github.com/dforsber/ssh-backend-connector","commit_stats":null,"previous_names":["dforsber/ssh-backend-connector"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dforsber%2Fssh-backend-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dforsber%2Fssh-backend-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dforsber%2Fssh-backend-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dforsber%2Fssh-backend-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dforsber","download_url":"https://codeload.github.com/dforsber/ssh-backend-connector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248304939,"owners_count":21081551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["security-tools","ssh-client","ssh-tunnel","vpn"],"created_at":"2025-02-03T08:52:44.882Z","updated_at":"2025-10-19T11:30:07.521Z","avatar_url":"https://github.com/dforsber.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSH Backend Connector\n\n\u003e Secure SSH backend connection manager for applications with password protected encrypted key storage.\n\n## Features\n\n- Secure AES-256-GCM encryption for SSH keys\n- Password-based key derivation using scrypt\n- Automatic cleanup of sensitive data\n- Encrypted local storage of SSH keys and configurations\n- SSH tunnel management\n\n## Install\n\n```bash\nnpm install ssh-backend-connector\n```\n\n## Usage\n\n```typescript\nimport { SSHStoreManager, SSHManager } from \"ssh-backend-connector\";\n\n// Initialize store with encryption\nconst store = new SSHStoreManager();\nawait store.connect(\"your-secure-password\"); // At least 12 characters\n\n// Store SSH keys (encrypted)\nawait store.saveKeyPair({\n  id: \"prod-key\",\n  name: \"Production Server\",\n  privateKey: \"-----BEGIN RSA PRIVATE KEY-----...\",\n});\n\n// Store backend config\nawait store.saveBackend({\n  id: \"prod\",\n  name: \"Production\",\n  host: \"192.168.1.100\",\n  port: 22,\n  username: \"admin\",\n  keyPairId: \"prod-key\",\n  tunnels: [{ localPort: 1234, remotePort: 4321 }],\n});\n\n// Create SSH manager with the store\nconst ssh = new SSHManager(store);\n\n// Connect and setup tunnel\nawait ssh.connect(\"prod\");\n\n// When done, cleanup\nssh.disconnect(\"prod\");\nstore.disconnect(); // Clears sensitive data from memory\n```\n\n## API\n\n### SSHStoreManager\n\n- `connect(password: string)`: Initialize encryption with password\n- `disconnect()`: Clear sensitive data from memory\n- `saveKeyPair(keyPair: SSHKeyPair)`: Store encrypted SSH key pair\n- `getKeyPair(id: string)`: Retrieve and decrypt key pair\n- `getAllKeyPairs()`: List all key pairs\n- `deleteKeyPair(id: string)`: Remove key pair\n- `saveBackend(backend: Backend)`: Store backend configuration\n- `getBackend(id: string)`: Retrieve backend config\n- `getAllBackends()`: List all backends\n- `deleteBackend(id: string)`: Remove backend config\n\n### SSHManager\n\n- `constructor(store: SSHStoreManager)`: Create manager with store\n- `connect(backendId: string)`: Establish SSH connection\n- `disconnect(backendId: string)`: Close connection\n\n## Security\n\nThis package takes security seriously:\n\n✓ Passwords must be at least 12 characters with complexity requirements  \n✓ Keys are encrypted using AES-256-GCM  \n✓ Sensitive data is automatically cleared from memory  \n✓ Password is never stored in memory  \n✓ Encryption is verified on connection  \n✓ Rate limiting on connection attempts  \n✓ Connection timeouts to prevent hanging  \n✓ Maximum concurrent connections limit  \n✓ File size limits to prevent DoS  \n✓ Secure file permissions (0600)  \n✓ Path traversal protection\n\n### Future Security Improvements\n\nHere is a list of potential future work items in the security area:\n\n- **Crypto Versioning**\n\n  - Version tags for encrypted data\n  - Support for key rotation\n  - Crypto algorithm negotiation\n\n- **SSH Security**\n\n  - SSH key format validation\n  - Host key verification\n  - Certificate validation support\n\n- **Advanced Security Features**\n  - Audit logging\n  - Intrusion detection\n  - Automated backup/restore\n  - Key expiration and rotation policies\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run build\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdforsber%2Fssh-backend-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdforsber%2Fssh-backend-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdforsber%2Fssh-backend-connector/lists"}