sshd

package
v1.0.0-beta.20240501 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuditLogArchiver

func AuditLogArchiver()

audit操作日志归档定时任务 每天归档一次压缩到tar.gz;默认保留3个月

func CopyID

func CopyID(username, host string, port int, passwd, pubKeyFile string) ([]byte, error)

CopyID CopyID

func ErrorInfo

func ErrorInfo(err error, sess *ssh.Session)

ErrorInfo ErrorInfo

func ExecuteSCP

func ExecuteSCP(args []string, clientSess *ssh.Session) error

ExecuteSCP ExecuteSCP

func GenKey

func GenKey(keyFilePath string) (string, string, error)

GenKey gen ssh private and public key

func GetClientByPasswd

func GetClientByPasswd(username, host string, port int, passwd string) (*sshclient.Client, error)

GetClientByPasswd GetClientByPasswd

func Info

func Info(msg string, sess *ssh.Session)

Info Info

func NewAuditLog

func NewAuditLog(user, host string) (*os.File, error)

new audit log

func NewSSHClient

func NewSSHClient(server config.Server, sshUser config.SSHUser) (*gossh.Client, *gossh.Client, error)

NewSSHClient NewSSHClient

func NewTerminal

func NewTerminal(server config.Server, sshUser config.SSHUser, sess *ssh.Session, timeout string) error

NewTerminal NewTerminal

func ParseRawCommand

func ParseRawCommand(command string) (string, []string, error)

ParseRawCommand ParseRawCommand

func ProxyClient

func ProxyClient(instance config.Server, proxy db.CreateProxyRequest, sshUser config.SSHUser) (*gossh.Client, *gossh.Client, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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