unpair
Remove a paired host and delete its connecto-generated keys.
Usage
connecto unpair <HOST>
Arguments
| Argument | Description |
|---|---|
HOST | Name of the paired host to remove |
Description
The unpair command removes a pairing established by Connecto:
- Removes the connecto-managed host entry from
~/.ssh/config - Deletes the private and public key files only if the key follows the
connecto naming convention (
connecto_*/connecto_sync_*)
unpair only operates on entries marked # Added by connecto. Hand-written
host blocks in ~/.ssh/config are never touched, even if they share the same
alias.
Example
connecto unpair mydesktop
Output:
✓ Removed 'mydesktop' from SSH config.
✓ Deleted private key: /home/user/.ssh/connecto_mydesktop
✓ Deleted public key: /home/user/.ssh/connecto_mydesktop.pub
When the entry uses a personal key
If the pairing was made with --key or a configured default key, the key is
not deleted — only the config entry is removed, and connecto says so:
✓ Removed 'mydesktop' from SSH config.
→ Key left untouched (not generated by connecto): /home/user/.ssh/id_ed25519
Notes
- This only removes the local configuration
- The public key remains in the remote machine’s
~/.ssh/authorized_keys - To fully revoke access, also remove the key from the remote machine
(
connecto keys removeon that machine) - Keys that don’t follow the
connecto_*naming convention are never deleted, so a shared personal key is safe
Exit status
unpair exits non-zero if the host is not found among the connecto-managed
entries (or no SSH config exists), so scripts can detect the failure.
Re-pairing
After unpairing, you can pair again:
connecto scan
connecto pair 0
A new key pair will be generated and exchanged.
Related commands
| Command | Description |
|---|---|
connecto hosts | List all paired hosts |
connecto export | Backup pairings before removing |