ssh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrSSHBannerTimeout greet.ErrorCode = "banner_timeout"
	ErrSSHInvalidBanner greet.ErrorCode = "invalid_banner"
)
View Source
const DefaultSSHPort = 22

DefaultSSHPort is the well-known port for SSH.

View Source
const ProtocolName = "ssh"

ProtocolName is the registered name for the SSH protocol.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSH

type SSH struct{}

SSH implements an SSH version banner probe. It connects, reads the server's version string, and closes without sending its own banner (anonymous probe).

func (*SSH) DefaultPort

func (s *SSH) DefaultPort() int

func (*SSH) Description

func (s *SSH) Description() string

func (*SSH) Greet

func (s *SSH) Greet(ctx context.Context, host string, port int, opts ...greet.GreetOption) (*greet.GreetResult, error)

func (*SSH) Name

func (s *SSH) Name() string

func (*SSH) Transport

func (s *SSH) Transport() greet.Transport

type SSHResult

type SSHResult struct {
	VersionString string // e.g. "SSH-2.0-OpenSSH_8.9"
}

SSHResult holds the outcome of an SSH banner exchange.

Jump to

Keyboard shortcuts

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