Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

unpair

Remove a paired host and delete its connecto-generated keys.

Usage

connecto unpair <HOST>

Arguments

ArgumentDescription
HOSTName of the paired host to remove

Description

The unpair command removes a pairing established by Connecto:

  1. Removes the connecto-managed host entry from ~/.ssh/config
  2. 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 remove on 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.

CommandDescription
connecto hostsList all paired hosts
connecto exportBackup pairings before removing