sshutil

package module
v0.0.0-...-6124336 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2015 License: MIT Imports: 13 Imported by: 3

README

sshutil

Helpers for ssh.

License: MIT

GoDoc

Documentation

Overview

Package sshutil contains helpers for ssh.

Index

Constants

View Source
const (
	// Create the key if needed
	Create = 1 << iota
	// Save created keys to disk
	Save
	// RSA2048 uses RSA keys with 2048 bits
	RSA2048
)

Variables

This section is empty.

Functions

func CreatePasswordCheck

func CreatePasswordCheck(user string, pass []byte) func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error)

CreatePasswordCheck creates a simple password checking function suitable for PasswordCallback for testing.

func PublicKeyHash

func PublicKeyHash(pub ssh.PublicKey) []byte

PublicKeyHash produces a human readable hash of a public key.

Types

type KeyLoader

type KeyLoader struct {
	Path  string
	Flags uint32
}

KeyLoader provides an interface to load or create private keys.

func (KeyLoader) Load

func (kl KeyLoader) Load() (ssh.Signer, error)

Load a private key with the given parameters.

Jump to

Keyboard shortcuts

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