Documentation
¶
Overview ¶
Package tailssh is an SSH server integrated into Tailscale.
Index ¶
- type Pty
- type SSHTerminationError
- type Session
- func (s *Session) Close() error
- func (s *Session) Context() context.Context
- func (s *Session) Environ() []string
- func (s *Session) Exit(code int) error
- func (s *Session) LocalAddr() net.Addr
- func (s *Session) Peer() tailcfg.NodeView
- func (s *Session) Pty() (_ Pty, _ <-chan Window, ok bool)
- func (s *Session) RawCommand() string
- func (s *Session) Read(p []byte) (int, error)
- func (s *Session) RemoteAddr() net.Addr
- func (s *Session) SetDeadline(t time.Time) error
- func (s *Session) SetReadDeadline(t time.Time) error
- func (s *Session) SetWriteDeadline(t time.Time) error
- func (s *Session) Signals(c chan<- Signal)
- func (s *Session) Stderr() io.Writer
- func (s *Session) Subsystem() string
- func (s *Session) User() string
- func (s *Session) UserProfile() tailcfg.UserProfile
- func (s *Session) Write(p []byte) (int, error)
- type Signal
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pty ¶ added in v1.100.0
type Pty struct {
// Term is the TERM environment variable value.
Term string
// Window is the initial window size.
Window Window
// Modes are the RFC 4254 terminal modes as opcode/value pairs.
Modes map[uint8]uint32
}
Pty represents a PTY request and configuration.
type SSHTerminationError ¶ added in v1.24.0
SSHTerminationError is implemented by errors that terminate an SSH session and should be written to user's sessions.
type Session ¶ added in v1.100.0
type Session struct {
// contains filtered or unexported fields
}
Session wraps a gliderlabs gliderssh.Session with Tailscale peer identity information. It implements net.Conn so callers that only need Read/Write/Close can use it directly. Callers that need SSH-specific functionality can type-assert from the net.Conn returned by the listener's Accept.
func (*Session) Close ¶ added in v1.100.0
Close signals the session handler to return and closes the underlying channel.
func (*Session) Context ¶ added in v1.100.0
Context returns the session's context, which is canceled when the client disconnects.
func (*Session) Environ ¶ added in v1.100.0
Environ returns a copy of the environment variables set by the client.
func (*Session) Exit ¶ added in v1.100.0
Exit sends an exit status to the client and closes the session.
func (*Session) LocalAddr ¶ added in v1.100.0
LocalAddr returns the net.Addr of the server side of the connection.
func (*Session) Pty ¶ added in v1.100.0
Pty returns PTY information, a channel of window size changes, and whether a PTY was requested.
func (*Session) RawCommand ¶ added in v1.100.0
RawCommand returns the exact command string provided by the client.
func (*Session) RemoteAddr ¶ added in v1.100.0
RemoteAddr returns the net.Addr of the client side of the connection.
func (*Session) SetDeadline ¶ added in v1.100.0
SetDeadline is not supported and returns an error.
func (*Session) SetReadDeadline ¶ added in v1.100.0
SetReadDeadline is not supported and returns an error.
func (*Session) SetWriteDeadline ¶ added in v1.100.0
SetWriteDeadline is not supported and returns an error.
func (*Session) Signals ¶ added in v1.100.0
Signals registers a channel to receive signals from the client. Pass nil to unregister.
func (*Session) Subsystem ¶ added in v1.100.0
Subsystem returns the subsystem requested by the client.
func (*Session) UserProfile ¶ added in v1.100.0
func (s *Session) UserProfile() tailcfg.UserProfile
UserProfile returns the Tailscale user profile of the remote node.
For tagged nodes, this is same sort of UserProfile that is returned by the LocalAPI WhoIs API.