Versions in this module Expand all Collapse all v0 v0.7.0 Nov 8, 2015 v0.6.15 Sep 26, 2015 Changes in this version + const CS7 + const CS8 + const CertAlgoDSAv01 + const CertAlgoECDSA256v01 + const CertAlgoECDSA384v01 + const CertAlgoECDSA521v01 + const CertAlgoRSAv01 + const CertTimeInfinity + const ECHO + const ECHOCTL + const ECHOE + const ECHOK + const ECHOKE + const ECHONL + const HostCert + const ICANON + const ICRNL + const IEXTEN + const IGNCR + const IGNPAR + const IMAXBEL + const INLCR + const INPCK + const ISIG + const ISTRIP + const IUCLC + const IXANY + const IXOFF + const IXON + const KeyAlgoDSA + const KeyAlgoECDSA256 + const KeyAlgoECDSA384 + const KeyAlgoECDSA521 + const KeyAlgoRSA + const NOFLSH + const OCRNL + const OLCUC + const ONLCR + const ONLRET + const ONOCR + const OPOST + const PARENB + const PARMRK + const PARODD + const PENDIN + const TOSTOP + const TTY_OP_ISPEED + const TTY_OP_OSPEED + const UserCert + const VDISCARD + const VDSUSP + const VEOF + const VEOL + const VEOL2 + const VERASE + const VFLUSH + const VINTR + const VKILL + const VLNEXT + const VQUIT + const VREPRINT + const VSTART + const VSTATUS + const VSTOP + const VSUSP + const VSWTCH + const VWERASE + const XCASE + func DiscardRequests(in <-chan *Request) + func Marshal(msg interface{}) []byte + func MarshalAuthorizedKey(key PublicKey) []byte + func ParseDSAPrivateKey(der []byte) (*dsa.PrivateKey, error) + func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) + func Unmarshal(data []byte, out interface{}) error + type AuthMethod interface + func KeyboardInteractive(challenge KeyboardInteractiveChallenge) AuthMethod + func Password(secret string) AuthMethod + func PasswordCallback(prompt func() (secret string, err error)) AuthMethod + func PublicKeys(signers ...Signer) AuthMethod + func PublicKeysCallback(getSigners func() (signers []Signer, err error)) AuthMethod + type CertChecker struct + Clock func() time.Time + HostKeyFallback func(addr string, remote net.Addr, key PublicKey) error + IsAuthority func(auth PublicKey) bool + IsRevoked func(cert *Certificate) bool + SupportedCriticalOptions []string + UserKeyFallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) + func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permissions, error) + func (c *CertChecker) CheckCert(principal string, cert *Certificate) error + func (c *CertChecker) CheckHostKey(addr string, remote net.Addr, key PublicKey) error + type Certificate struct + CertType uint32 + Key PublicKey + KeyId string + Nonce []byte + Reserved []byte + Serial uint64 + Signature *Signature + SignatureKey PublicKey + ValidAfter uint64 + ValidBefore uint64 + ValidPrincipals []string + func (c *Certificate) Marshal() []byte + func (c *Certificate) SignCert(rand io.Reader, authority Signer) error + func (c *Certificate) Type() string + func (c *Certificate) Verify(data []byte, sig *Signature) error + type Channel interface + Close func() error + CloseWrite func() error + Read func(data []byte) (int, error) + SendRequest func(name string, wantReply bool, payload []byte) (bool, error) + Stderr func() io.ReadWriter + Write func(data []byte) (int, error) + type Client struct + func Dial(network, addr string, config *ClientConfig) (*Client, error) + func NewClient(c Conn, chans <-chan NewChannel, reqs <-chan *Request) *Client + func (c *Client) Dial(n, addr string) (net.Conn, error) + func (c *Client) DialTCP(n string, laddr, raddr *net.TCPAddr) (net.Conn, error) + func (c *Client) HandleChannelOpen(channelType string) <-chan NewChannel + func (c *Client) Listen(n, addr string) (net.Listener, error) + func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) + func (c *Client) NewSession() (*Session, error) + type ClientConfig struct + Auth []AuthMethod + ClientVersion string + HostKeyAlgorithms []string + HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error + User string + type Config struct + Ciphers []string + KeyExchanges []string + MACs []string + Rand io.Reader + RekeyThreshold uint64 + func (c *Config) SetDefaults() + type Conn interface + Close func() error + OpenChannel func(name string, data []byte) (Channel, <-chan *Request, error) + SendRequest func(name string, wantReply bool, payload []byte) (bool, []byte, error) + Wait func() error + func NewClientConn(c net.Conn, addr string, config *ClientConfig) (Conn, <-chan NewChannel, <-chan *Request, error) + type ConnMetadata interface + ClientVersion func() []byte + LocalAddr func() net.Addr + RemoteAddr func() net.Addr + ServerVersion func() []byte + SessionID func() []byte + User func() string + type ExitError struct + func (e *ExitError) Error() string + type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error) + type NewChannel interface + Accept func() (Channel, <-chan *Request, error) + ChannelType func() string + ExtraData func() []byte + Reject func(reason RejectionReason, message string) error + type OpenChannelError struct + Message string + Reason RejectionReason + func (e *OpenChannelError) Error() string + type Permissions struct + CriticalOptions map[string]string + Extensions map[string]string + type PublicKey interface + Marshal func() []byte + Type func() string + Verify func(data []byte, sig *Signature) error + func NewPublicKey(k interface{}) (PublicKey, error) + func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) + func ParsePublicKey(in []byte) (out PublicKey, err error) + type RejectionReason uint32 + const ConnectionFailed + const Prohibited + const ResourceShortage + const UnknownChannelType + func (r RejectionReason) String() string + type Request struct + Payload []byte + Type string + WantReply bool + func (r *Request) Reply(ok bool, payload []byte) error + type ServerConfig struct + AuthLogCallback func(conn ConnMetadata, method string, err error) + KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error) + NoClientAuth bool + PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error) + PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) + ServerVersion string + func (s *ServerConfig) AddHostKey(key Signer) + type ServerConn struct + Permissions *Permissions + func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error) + type Session struct + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + func (s *Session) Close() error + func (s *Session) CombinedOutput(cmd string) ([]byte, error) + func (s *Session) Output(cmd string) ([]byte, error) + func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error + func (s *Session) RequestSubsystem(subsystem string) error + func (s *Session) Run(cmd string) error + func (s *Session) SendRequest(name string, wantReply bool, payload []byte) (bool, error) + func (s *Session) Setenv(name, value string) error + func (s *Session) Shell() error + func (s *Session) Signal(sig Signal) error + func (s *Session) Start(cmd string) error + func (s *Session) StderrPipe() (io.Reader, error) + func (s *Session) StdinPipe() (io.WriteCloser, error) + func (s *Session) StdoutPipe() (io.Reader, error) + func (s *Session) Wait() error + type Signal string + const SIGABRT + const SIGALRM + const SIGFPE + const SIGHUP + const SIGILL + const SIGINT + const SIGKILL + const SIGPIPE + const SIGQUIT + const SIGSEGV + const SIGTERM + const SIGUSR1 + const SIGUSR2 + type Signature struct + Blob []byte + Format string + type Signer interface + PublicKey func() PublicKey + Sign func(rand io.Reader, data []byte) (*Signature, error) + func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) + func NewSignerFromKey(k interface{}) (Signer, error) + func ParsePrivateKey(pemBytes []byte) (Signer, error) + type TerminalModes map[uint8]uint32 + type Waitmsg struct + func (w Waitmsg) ExitStatus() int + func (w Waitmsg) Lang() string + func (w Waitmsg) Msg() string + func (w Waitmsg) Signal() string + func (w Waitmsg) String() string