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

test

Test SSH connection to a paired host.

Usage

connecto test <HOST>

Arguments

ArgumentDescription
HOSTName of the paired host to test

Description

The test command verifies that SSH connectivity works to a paired host. It:

  1. Runs ssh against the host alias (so it uses your ~/.ssh/config entry)
  2. Uses BatchMode (no password prompts) and a 5-second connection timeout
  3. Executes a trivial echo command and checks the response
  4. Reports success or failure

Example

Successful test

connecto test mydesktop

Output:

→ Testing connection to mydesktop...
✓ Connection successful!

Failed test

connecto test mydesktop

Output:

→ Testing connection to mydesktop...
✗ Connection failed.

Troubleshooting:
  • Check if the host is online
  • Verify the IP is correct: connecto hosts
  • Update IP if changed: connecto update-ip mydesktop <new-ip>

A failed test exits non-zero, so it can gate scripts:

connecto test mydesktop && rsync -a project/ mydesktop:project/

Common issues

ErrorCauseSolution
Connection refusedHost offline or SSH not runningStart the remote machine
Connection timed outWrong IP or network issueUpdate IP with connecto update-ip
Permission deniedKey not in authorized_keysRe-pair with connecto pair
Host key verification failedRemote host changedRemove from ~/.ssh/known_hosts
CommandDescription
connecto hostsList all paired hosts
connecto update-ipUpdate host’s IP address
connecto pairRe-establish pairing