scp

package
v2.6.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package scp handles file uploads and downloads via scp command

Index

Constants

View Source
const (
	// OKByte is scp OK message bytes
	OKByte = 0x0
	// WarnByte tells that next goes a warning string
	WarnByte = 0x1
	// ErrByte tells that next goes an error string
	ErrByte = 0x2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Source     bool // data producer
	Sink       bool // data consumer
	Verbose    bool // verbose
	Target     []string
	Recursive  bool
	User       *user.User
	AuditLog   events.IAuditLog
	RemoteAddr string
	LocalAddr  string

	// terminal is only initialized on the client, for printing the progress
	Terminal io.Writer
}

Command mimics behavior of SCP command line tool to teleport can pretend it launches real scp behind the scenes

func (*Command) Execute added in v1.0.0

func (cmd *Command) Execute(ch io.ReadWriter) (err error)

Execute() implements SSH file copy (SCP). It is called on both tsh (client) and teleport (server) side.

type MtimeCmd

type MtimeCmd struct {
	Mtime time.Time
	Atime time.Time
}

func ParseMtime

func ParseMtime(line string) (*MtimeCmd, error)

type NewFileCmd

type NewFileCmd struct {
	Mode   int64
	Length uint64
	Name   string
}

func ParseNewFile

func ParseNewFile(line string) (*NewFileCmd, error)

Jump to

Keyboard shortcuts

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