Connecting Claude Code or Codex to a Raspberry Pi via SSH Keys Instead of Passwords

A guide explains how a coding agent such as Claude Code or Codex can run commands on a Raspberry Pi over SSH without the account password being pasted into the conversation. It recommends setting up key-based authentication, with a dedicated Ed25519 key generated and installed on the Pi by the user in their own terminal. The client handles authentication locally, optionally through an ssh-agent, so the model never sees the private key or its passphrase. The article stresses that key-based access does not make the agent's permissions read-only, since commands still run with the remote account's rights. It also advises verifying the Pi's host-key fingerprint on first connection and keeping host-key checking enabled.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in