sshconsole

package module
v0.0.0-...-0940828 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: MIT Imports: 6 Imported by: 0

README

sshConsole

golang ssh 封装方便使用

用例在examples里,改下为自己的密钥就行。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(Client *ssh.Client)

Command 命令行运行

func FormatPublicKey

func FormatPublicKey(buf []byte) ssh.AuthMethod

FormatPublicKey 格式化key

func ReadKey

func ReadKey(keypath []string) []ssh.AuthMethod

ReadKey 传入文件地址取得key

func SSHPW

func SSHPW(user, password, ip string, port int) *ssh.Client

SSHPW 账号密码连接

func SSHRsaFile

func SSHRsaFile(ip string, port int, user, keyPath string) *ssh.Client

SSHRsaFile rsa文件连接

func SSHRsaKey

func SSHRsaKey(ip string, port int, user string, key ssh.AuthMethod) *ssh.Client

SSHRsaKey rsa密钥连接

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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