Documentation ¶
Index ¶
- func AuditLogArchiver()
- func CheckPermission(argsWithServer string, user User, inputAction Action, matchPolicies []Policy) error
- func CopyID(username, host string, port int, passwd, pubKeyFile string) ([]byte, error)
- func ErrorInfo(err error, sess *ssh.Session)
- func ExecuteSCP(args []string, clientSess *ssh.Session) error
- func GenKey(keyFilePath string) (string, string, error)
- func GetClientByPasswd(username, host string, port int, passwd string) (*sshclient.Client, error)
- func Info(msg string, sess *ssh.Session)
- func NewAuditLog(user, host string) (*os.File, error)
- func NewSSHClient(server Server, sshUser SSHUser) (*gossh.Client, *gossh.Client, error)
- func NewTerminal(server Server, sshUser SSHUser, sess *ssh.Session) error
- func ParseRawCommand(command string) (string, []string, error)
- func ProxyClient(instance Server, proxy CreateProxyRequest, sshUser SSHUser) (*gossh.Client, *gossh.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermission ¶
func CheckPermission(argsWithServer string, user User, inputAction Action, matchPolicies []Policy) error
argsWithServer 是 root@10.9.x.x:/data/xx.zip 这一串组合字符,方法内会解析
func ExecuteSCP ¶
ExecuteSCP ExecuteSCP
func GetClientByPasswd ¶
GetClientByPasswd GetClientByPasswd
func NewSSHClient ¶
NewSSHClient NewSSHClient proxy client 返回主要是为了外部 close 用。
func NewTerminal ¶
NewTerminal NewTerminal
func ParseRawCommand ¶
ParseRawCommand ParseRawCommand
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.