Documentation ¶
Index ¶
- Constants
- func NewSSHClient(ip, port, user, password string) (client *ssh.Client, err error)
- func NewScpClient(ip, port, user, password string) (client scp.Client, err error)
- func NewScpClientBySSH(sshClient *ssh.Client) (client scp.Client, err error)
- func RunCommandRemote(client *ssh.Client, command string) error
- func RunScriptRemote(sshClient *ssh.Client, scriptFile, permissions string, needClean bool) error
- func Scp(client scp.Client, localFile, remotePath, permissions string) error
Constants ¶
View Source
const ( DefaultSSHPort = "22" DefaultSSHUser = "root" DefaultPermissions = "0777" TmpDir = "/tmp" PatternIP = "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$" PatternPort = "^\\d{1,5}$" )
Variables ¶
This section is empty.
Functions ¶
func NewSSHClient ¶
func NewScpClient ¶
func NewScpClientBySSH ¶
func RunScriptRemote ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.