Skip to main content

Manager for remote ~/.ssh/authorized_keys.

Project description

Manager for remote ~/.ssh/authorized_keys.

Usage: ssh-authorizer {help,get,add,del,test} [–raw] ssh_string …

command:

help: Print this help.

get: Display remote authorized_keys. get –raw: Display without formating.

add: Add keys to remote authorized_keys. del: Delete keys from remote authorized_keys. test: Test keys exist in remote authorized_keys.

ssh_string: String with connect info: [user@]host[:port].

By default user is current system user, port=22.

keys: For commands “add” and “test” this is list of files with keys.

If empty – “~/ssh/id_rsa.pub” used.

keys: For commad “del” this is key indeces for delete.

See “get” without “–raw”.

Examples:

ssh-authorizer get username@hostname

Get authorized_keys in host hostname for user username.

ssh-authorizer add user@host

Add your local “~/ssh/id_rsa.pub” to remote “~/ssh/authorized_keys”.

ssh-authorizer add user@host key.pub key2.pub

Add “key.pub” “key2.pub” to remote “~/ssh/authorized_keys”.

ssh-authorizer del user@host 1 3

Delete fist and third keys from remote “~/ssh/authorized_keys”.

ssh-authorizer test user@host key.pub key2.pub

“key.pub” “key2.pub” already in remote “~/ssh/authorized_keys”? Check it.

TODO:

Work with known_hosts:

The authenticity of host ‘bla-bla-bla’ can’t be established. RSA key fingerprint is 98:1e:38:bla:bla:bla:c7:e5:fe. Are you sure you want to continue connecting (yes/no)?

ssh-authorizer del user@host

Delete your “~/ssh/id_rsa.pub” from remote “~/ssh/authorized_keys”.

ssh-authorizer del user@host zzz@macbook

Delete key “zzz@macbook” from remote “~/ssh/authorized_keys”.

get –short: Like “get”, but without key hashes.

Human-readible errors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssh_authorizer-1.0.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file ssh_authorizer-1.0.tar.gz.

File metadata

File hashes

Hashes for ssh_authorizer-1.0.tar.gz
Algorithm Hash digest
SHA256 41eb803390f8c2d909558a5fcd5a7a91ea03e4e6c70dd94a7081a1b28f28cd68
MD5 31fcdc1cedc4c7f707143694cc38832e
BLAKE2b-256 4c49c7598825120875a0f195f02d620afdfcaf3aa17b932d6e889d7d2b35a588

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page