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

Configuration

Connecto stores configuration in platform-specific locations.

Config file location

PlatformPath
macOS~/Library/Application Support/com.connecto.connecto/config.json
Linux~/.config/connecto/config.json
Windows%APPDATA%\connecto\connecto\config\config.json

Find your config path:

connecto config path

Config file format

{
  "subnets": [
    "10.0.2.0/24",
    "192.168.100.0/24"
  ],
  "default_key": "/Users/john/.ssh/id_ed25519"
}

Fields

FieldTypeDescription
subnetsstring[]CIDR ranges to scan automatically
default_keystring?Path to default SSH key for pairing and sync (optional)

Device cache

connecto scan caches its results so connecto pair <number> can resolve device numbers. The cache lives in the per-user cache directory:

PlatformPath
macOS~/Library/Caches/com.connecto.connecto/devices.json
Linux~/.cache/connecto/devices.json
Windows%LOCALAPPDATA%\connecto\connecto\cache\devices.json

SSH Configuration

Connecto modifies ~/.ssh/config when pairing or syncing. Each paired host gets a four-line block preceded by a marker comment:

# Added by connecto
Host mydesktop
    HostName 192.168.1.55
    User john
    IdentityFile /home/user/.ssh/connecto_mydesktop

Entry fields

FieldDescription
HostAlias used with ssh command
HostNameIP address or hostname
UserRemote username
IdentityFilePath to private key

The # Added by connecto marker is how Connecto tells its own entries apart from yours: hosts, unpair, update-ip, and export only ever read or modify marked blocks. Hand-written host blocks are never listed, rewritten, or removed — even if they share an alias with a managed entry. Config writes are atomic, so an interrupted write cannot truncate the file.

SSH Keys

Keys are stored in the SSH directory:

PlatformDirectory
macOS/Linux~/.ssh/
Windows%USERPROFILE%\.ssh\

Key files

For each paired host:

  • ~/.ssh/connecto_<device> - Private key (mode 600)
  • ~/.ssh/connecto_<device>.pub - Public key

Keys generated by connecto sync use the connecto_sync_ prefix. <device> is the device name sanitized to a lowercase alias (e.g. My Desktopmy-desktop). When a default key is configured (connecto config set-default-key) or --key is used, no new files are created and the config entry points at the existing key.

Key type

Connecto generates Ed25519 keys by default:

  • Modern elliptic curve cryptography
  • 128-bit security level
  • Small key size (compact authorized_keys)
  • Fast generation and authentication

RSA-4096 is available via --rsa.

Home directory resolution

Connecto resolves your home directory (for ~/.ssh and friends) through one shared strategy: the platform user-directories API first, then the HOME / USERPROFILE environment variables as a fallback. The CLI and core library always agree on where ~/.ssh is.

Ports

PortProtocolPurpose
5353UDPmDNS discovery
8099TCPPairing / sync protocol

authorized_keys format

When accepting a pairing, Connecto appends the received public key to ~/.ssh/authorized_keys exactly as sent:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG... user@laptop

The trailing comment is the key’s own comment — user@hostname by default, or whatever was passed via --comment. Duplicate keys are not added twice, and the file is rewritten atomically. Use connecto keys list / connecto keys remove to manage it.