sshd

package module
v0.0.0-...-2e48466 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

README

go-sshd

  1. 实现了UNIX平台基本的shell操作
  2. 添加了sftp的功能

Thanks

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PtyRun

func PtyRun(c *exec.Cmd, tty *os.File) (err error)

PtyRun Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, and c.Stderr, calls c.Start, and returns the File of the tty's corresponding pty.

func SetWindowSize

func SetWindowSize(fd uintptr, w, h uint32)

SetWindowSize sets the size of the given pty.

Types

type SSHServer

type SSHServer struct {
	Port         int
	Address      string
	Server       *ssh.ServerConfig
	HostKey      []byte
	EnableSftp   bool
	ReadOnlySftp bool
}

func (*SSHServer) Start

func (s *SSHServer) Start()

type WindowSize

type WindowSize struct {
	Height uint16
	Width  uint16
}

WindowSize stores the Height and Width of a terminal.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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