sshkeys

package module
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 6 Imported by: 4

README

sshkeys

Actions Status Coverage Status PkgGoDev go-report

Get all ssh public keys of an ssh server.

Installation
go install github.com/Eun/sshkeys/cmd/sshkeys

OR

Prebuild from Releases

Usage
sshkeys [options] host

Options:
    -format=authorized_keys       Format to print the public keys, valid formats are: fingerprint, fingerprint-sha1, sha1, fingerprint-legacy, fingerprint-md5, md5, authorized_keys, authorizedkeys, authorized
    -output=console               Output format, valid formats are: console, json
    -timeout=60s                  Connection timeout
    -concurrent=4                 Concurrent workers
Example
sshkeys example.com
sshkeys -format=fingerprint-md5 -output=json example.com:22

Build History

Build history

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKeyAlgorithms

func DefaultKeyAlgorithms() []string

DefaultKeyAlgorithms returns the default ssh key algorithms.

func GetKeys

func GetKeys(ctx context.Context, host string, concurrentWorkers int, algorithms ...string) (map[string]ssh.PublicKey, error)

GetKeys gets the public keys for a host. Specify the amount of concurrentWorkers and the algorithms that should be used to fetch the keys. If unsure use DefaultKeyAlgorithms.

func GetVersion

func GetVersion(ctx context.Context, host string) (string, error)

GetVersion returns the ssh version of the host.

Types

This section is empty.

Directories

Path Synopsis
cmd
sshkeys command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL