hostedpi ssh keys add
Add an SSH key to one or more Raspberry Pi servers
Usage: hostedpi ssh keys add [OPTIONS] SSH_KEY_PATH [NAMES]...
Arguments
- ssh_key_path [path] [required]
Path to the SSH key to install on the Raspberry Pi servers
- names [str ...]
Name of the Raspberry Pi server to add SSH keys to
Options
- --filter [str]
Search pattern for filtering server names
- --help
Show this message and exit
Usage
Add your SSH key to a Pi:
$ hostedpi ssh keys add ~/.ssh/id_rsa.pub mypi
Added key /home/ben/.ssh/id_rsa.pub to mypi
Add your SSH key to multiple Pis:
$ hostedpi ssh keys add ~/.ssh/id_rsa.pub mypi mypi2 mypi3
Added key /home/ben/.ssh/id_rsa.pub to mypi
Key /home/ben/.ssh/id_rsa.pub already exists on mypi2
Added key /home/ben/.ssh/id_rsa.pub to mypi3
Add your SSH key to all Pis matching a filter:
$ hostedpi ssh keys add ~/.ssh/id_rsa.pub --filter mypi
Added key /home/ben/.ssh/id_rsa.pub to mypi
Key /home/ben/.ssh/id_rsa.pub already exists on mypi2
Added key /home/ben/.ssh/id_rsa.pub to mypi3
Added key /home/ben/.ssh/id_rsa.pub to mypi4
Add your SSH key to all Pis:
$ hostedpi ssh keys add ~/.ssh/id_rsa.pub
Added key /home/ben/.ssh/id_rsa.pub to mypi
Key /home/ben/.ssh/id_rsa.pub already exists on mypi2
Added key /home/ben/.ssh/id_rsa.pub to mypi3
Added key /home/ben/.ssh/id_rsa.pub to mypi4
Added key /home/ben/.ssh/id_rsa.pub to anotherpi
Warning
Be sure to add your public key, not your private key. The public key is usually found in
~/.ssh/id_rsa.pub or similar, while the private key is in ~/.ssh/id_rsa or similar.