@sdillen/pi-ssh
pi extension: run all tools on an SSH host, with sudo and YubiKey/ED25519-SK support via ControlMaster
Package details
Install @sdillen/pi-ssh from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@sdillen/pi-ssh- Package
@sdillen/pi-ssh- Version
0.2.3- Published
- Oct 22, 2026
- Downloads
- 595/mo · 595/wk
- Author
- sdillen
- License
- MIT
- Types
- extension
- Size
- 43.3 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@sdillen/pi-ssh
A pi extension that runs all tools on an SSH host.
- read/write/edit/bash and
!commands execute remotely. - A dedicated
sudotool with a masked password dialog. The password is never written to the LLM context or the session file. - One-time interactive YubiKey / ED25519-SK authentication, then all calls reuse a ControlMaster socket.
Install
pi install npm:@sdillen/pi-ssh
Try it for a single run:
pi -e npm:@sdillen/pi-ssh --ssh user@host[:/remote/path]
Requirements: bash on the remote host and a reachable SSH key.
Notes
- sudo is its own tool.
sudo ...in the bash tool is rejected remotely. The sudo tool runs the command assudo bash -c, so pipes,&&, and redirects all run as root. - Password: remembered for 4 minutes, then asked again. A wrong password triggers one retry.
- Authentication: after the first interactive authentication, the ControlMaster socket (
~/.ssh/controlmaster/...) is reused. Its lifetime after the last connection isSSH_CONTROL_PERSISTseconds (default 43200 = 12 h). If the master dies mid-session, pi re-authenticates once automatically.
Full architecture notes and the development setup are in the repository README.