shellkey
v1.3.1
Published
Simple CLI to transmit your local SSH public key to a remote host's `authorized_keys`.
Readme
shellkey
Simple CLI to transmit your local SSH public key to a remote host's authorized_keys.
Requirements
- Node.js (12+)
ssh-keygenavailable on PATH- Network access to the target host (SSH)
Supported platforms
- Windows
- Linux
Install
Clone the repo and install dependencies:
npm installUsage
Generate or reuse your local keys and transmit the public key to a remote host:
node index.js user@hostBehavior
- If no
~/.ssh/id_rsaand~/.ssh/id_rsa.pubexist locally,shellkeywill create the.sshdirectory (if needed) and runssh-keygento create them. - The CLI will prompt for the remote user's password to connect and append your public key to
~/.ssh/authorized_keyson the remote.
Notes & Troubleshooting
- Ensure
ssh-keygenis installed (OpenSSH client tools). - The remote host must accept password authentication for initial connection.
- On Windows, the tool uses the current user's home
.sshdirectory. On Linux it uses~/.ssh. - If the tool fails to write remotely, check remote permissions and that
~/.ssh/authorized_keysexists or is writable.
License
- MIT
Automated key based SSH Authentication
Usage
shellkey <user>@<host>