Managing SSH Keys
SSH keys let you connect to servers without typing a password each time. A key pair has two parts:
- Private key — stays secret. Add this to SSH Bridge.
- Public key — safe to share. Upload this to the server you want to connect to.
1. Create an SSH Key Pair
On your computer, create a new Ed25519 key:
ssh-keygen -t ed25519 -f ~/.ssh/sshbridge_app -C "sshbridge-app"
Use a strong passphrase for human-owned SSH keys. Passphrase-free keys should only be used for narrowly scoped automation managed by an approved secret store.
This creates two files:
~/.ssh/sshbridge_app— private key~/.ssh/sshbridge_app.pub— public key
2. Upload the Public Key to Your Server
The server needs your public key in the user's authorized_keys file.
If password login is still enabled for a scoped user, the easiest way is:
ssh-copy-id -i ~/.ssh/sshbridge_app.pub [email protected]
Replace deploy and 203.0.113.10 with your server username and IP address. Avoid direct root SSH login for routine access; use an individual or scoped account and sudo for privileged operations.
If you need to upload it manually, copy the public key:
cat ~/.ssh/sshbridge_app.pub
Then append it on the server to:
~/.ssh/authorized_keys
Make sure permissions are correct on the server:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
3. Test the Key Outside SSH Bridge
Before adding the key to SSH Bridge, verify it works in your terminal:
ssh -i ~/.ssh/sshbridge_app [email protected]
If this connects, the server accepts the key.
4. Add the Key to SSH Bridge
- Open SSH Keys in the sidebar.
- Click Add Key.
- Enter a name, for example App Server Key.
- Paste the private key from
~/.ssh/sshbridge_appinto Private Key. - Optionally paste the public key from
~/.ssh/sshbridge_app.pubinto Public Key. - If the key has a passphrase, enter it in Passphrase.
- Click Save.
To copy the private key for pasting:
cat ~/.ssh/sshbridge_app
The private key usually starts with:
-----BEGIN OPENSSH PRIVATE KEY-----
[Your long block of encoded key data goes here]
-----END OPENSSH PRIVATE KEY-----
Paste the entire block into SSH Bridge, including the BEGIN OPENSSH PRIVATE KEY and END OPENSSH PRIVATE KEY lines.
Do not upload your private key to the server. Only the public key goes to the server.
5. Use the Key in a Host
- Open Hosts.
- Create a new host or edit an existing host.
- Set Auth Type to SSH Key.
- Select the SSH key you added, for example App Server Key.
- Confirm the host, port, and username are correct.
- Save the host.
- Connect to the host from SSH Bridge.
Troubleshooting
- Permission denied: The public key may not be in the correct user's
authorized_keysfile. - Wrong username: A key added for one Linux user will not work for another user unless that user's
authorized_keysalso contains the public key. - Passphrase error: If the key has a passphrase, enter the same passphrase when saving the key in SSH Bridge.
- Bad key format: Paste the full private key, including the BEGIN and END lines.
Managed SSH Keys
If you're part of a team, managed SSH keys can appear in your keys list with a team badge. These are read-only and managed by the team owner or admin. Prefer sharing access to SSH hosts rather than copying private keys between people.