sshd

package
v0.0.0-...-819ca92 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2016 License: BSD-3-Clause Imports: 15 Imported by: 1

Documentation

Overview

Package sshd parses ssh log lines and generates JSON representing ssh events

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedKey

type AuthorizedKey struct {
	ssh.PublicKey
	Comment string
}

AuthorizedKey represents an ssh public key

func ParseAuthorizedKey

func ParseAuthorizedKey(in []byte) (*AuthorizedKey, error)

ParseAuthorizedKey attempts to parse an ssh public key

func (*AuthorizedKey) Fingerprint

func (k *AuthorizedKey) Fingerprint() []byte

Fingerprint implements the RFC4716 key fingerprint for ssh keys

type SshdProfile

type SshdProfile struct {
	// contains filtered or unexported fields
}

SshdProfile is a logtailer profile that parses ssh login events from sshd logs

func (*SshdProfile) HandleOutput

func (p *SshdProfile) HandleOutput(records <-chan interface{}, dryRun bool) <-chan error

HandleOutput recieves a channel of input lines and a flag of whether or not this is a dry run being invoked (to avoid side-effects).

The return value is a channel of errors. logtailer keeps track of the number of errors and exits non-zero if they are over a threshold.

func (*SshdProfile) Init

func (p *SshdProfile) Init() error

Init initializes the SshdProfile instance

func (*SshdProfile) Name

func (p *SshdProfile) Name() string

Name returns the name of the profile and must be unique amongst registered. profiles

func (*SshdProfile) ProcessRecord

func (p *SshdProfile) ProcessRecord(line string) (interface{}, error)

ProcessRecord is invoked for every input log line. It returns a transformed. line or an error

Jump to

Keyboard shortcuts

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