suftp

package
v0.0.0-...-740721f Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubsystemClient

func NewSubsystemClient(conn *ssh.Client, subsystem string, opts ...sftp.ClientOption) (*sftp.Client, error)

NewSubsystemClient creates a new SFTP client on conn, using zero or more option functions.

Subsystem must be defined in targets sshd_config.

func NewSubsystemCommandClient

func NewSubsystemCommandClient(conn *ssh.Client, cmd string, opts ...sftp.ClientOption) (*sftp.Client, error)

NewSubsystemCommandClient creates a new SFTP client on conn, using a custom subsystem command and zero or more option functions.

Command cmd can be used to specify a custom subsystem command, similar to the -s option for sftp cli.

Specify subsystem as a path when the remote sshd does not have an sftp Subsystem configured. Specify subsystem as "sudo -u [user] /path/to/sftp-server" to get SFTP with another user.

Sudo must have NOPASSWD for the sftp-server binary.

func NewSudoClient

func NewSudoClient(conn *ssh.Client, user, sudopwd string, opts ...sftp.ClientOption) (*sftp.Client, error)

NewSudoClient creates a new SFTP client on conn, using user and sudopass for the conn user and zero or more option functions.

The user is the user to get an sftp client for. Sudopwd is the password for the user on conn.

Types

This section is empty.

Jump to

Keyboard shortcuts

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