@yilinyo/ssh4
v0.1.1
Published
CLI for generating SSH keys and adding hosts for passwordless login
Maintainers
Readme
ssh4
ssh4 is a small npm-based CLI for passwordless SSH setup.
Install
npm install -g @yilinyo/ssh4Usage
Generate a key pair:
ssh4 client generate prodAdd the public key to a server:
ssh4 host add prod --host example.com --user root --testAfter setup, connect directly with:
ssh prodList saved aliases:
ssh4 listRemove a saved alias:
ssh4 rm prodIf you want to choose a custom key path:
ssh4 client generate prod --path ~/.ssh/ssh4/prod/id_ed25519
ssh4 host add prod --user ubuntuNotes
ssh4 client genrateis accepted as a typo-friendly alias forgenerate.- The tool uses
ssh-keygenandsshfrom your system. - If
ssh-copy-idexists on your machine,ssh4 host addwill use it automatically. - Each alias gets its own key directory under
~/.ssh/ssh4/<alias>/. ssh4 host addrequiresssh4 client generate <alias>to run first so the public key exists.ssh4 host add <alias> --host ...writes host info into the alias folder on first use, then reuses it later without--host.ssh4 host adddefaults torootif you do not pass--user, but the CLI will tell you to pass it explicitly.ssh4 host addalso updates~/.ssh/configsossh <alias>can connect directly.ssh4 listscans~/.ssh/ssh4/directly, andssh4 rm <alias>removes one alias plus its local key directory.
