Documentation ¶
Index ¶
- Constants
- Variables
- func AuthKey(username string, auths []ssh.AuthMethod, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
- func PublicKey(file string) ssh.AuthMethod
- func PublicKeys(filenames []string) []ssh.AuthMethod
- func WithAgent(username string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
- func WithKey(username string, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
- func WithPassphrase(path string, passpharase []byte, username string, ...) (ssh.ClientConfig, error)
- func WithPassword(username string, password string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
- type DirHeader
- type EndDirHeader
- type FileHeader
- type FileInfo
- type Header
- type Option
- type Path
- type Receiver
- type Reply
- type ReplyType
- type Result
- type Scp
- type Sender
- type Session
- type Sftp
- type TimeHeader
Constants ¶
View Source
const KRemoteCmd = "scp"
Variables ¶
View Source
var ErrAck = errors.New("failed to write ack buffer")
View Source
var ErrCopy = errors.New("failed to copy file")
Functions ¶
func AuthKey ¶
func AuthKey(username string, auths []ssh.AuthMethod, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
func PublicKey ¶
func PublicKey(file string) ssh.AuthMethod
func PublicKeys ¶
func PublicKeys(filenames []string) []ssh.AuthMethod
func WithAgent ¶
func WithAgent(username string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
func WithKey ¶
func WithKey(username string, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
func WithPassphrase ¶
func WithPassphrase(path string, passpharase []byte, username string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
func WithPassword ¶
func WithPassword(username string, password string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
Types ¶
type EndDirHeader ¶ added in v1.4.23
type EndDirHeader struct { }
type FileHeader ¶ added in v1.4.23
type FileHeader struct {
FileInfo
}
type FileInfo ¶ added in v1.4.23
func (*FileInfo) CreateFile ¶ added in v1.4.23
func (fi *FileInfo) CreateFile(opt *Option) (io.WriteCloser, error)
type Reply ¶ added in v1.4.23
func (Reply) GetMessage ¶ added in v1.4.23
GetMessage returns the message the remote sent back.
func (Reply) IsError ¶ added in v1.4.23
IsError returns true when the remote responded with an error.
type Scp ¶
type Scp struct {
// contains filtered or unexported fields
}
func (*Scp) ReceiveFrom ¶ added in v1.1.11
func (*Scp) SendToByReader ¶ added in v1.1.11
type Session ¶
type Session struct { Host string //ip:port Session *ssh.Session Client *ssh.Client // contains filtered or unexported fields }
func NewSession ¶
func NewSession(host string, conf *ssh.ClientConfig) *Session
Source Files ¶
Click to show internal directories.
Click to hide internal directories.