Documentation
¶
Index ¶
- Constants
- func GetProxyList(server string, config conf.Config) (proxyList []string, proxyType map[string]string, err error)
- type AuthKey
- type Connect
- func (c *Connect) CheckClientAlive() error
- func (c *Connect) ConTerm(session *ssh.Session) (err error)
- func (c *Connect) CreateClient() (err error)
- func (c *Connect) CreateSession() (session *ssh.Session, err error)
- func (c *Connect) CreateSshAgent() (err error)
- func (c *Connect) PortForwarder()
- func (c *Connect) RunCmd(session *ssh.Session, command []string) (err error)
- func (c *Connect) RunCmdWithOutput(session *ssh.Session, command []string, outputChan chan []byte)
- func (c *Connect) SendKeepAlive(session *ssh.Session)
- type CopyConInfo
- type ExecHistory
- type History
- type Output
- type P11
- func (p *P11) CreateCtx(pkcs11Provider string) (err error)
- func (p *P11) Get() (cryptoSigners []crypto.Signer, err error)
- func (p *P11) GetCryptoSigner() (signers []crypto.Signer, err error)
- func (p *P11) GetKeyID() (err error)
- func (p *P11) GetPIN() (err error)
- func (p *P11) GetTokenLabel() (err error)
- func (p *P11) RecreateCtx(pkcs11Provider string) (err error)
- type Proxy
- type Run
- type RunScp
Constants ¶
View Source
const ( AUTHKEY_AGENT = "agent" AUTHKEY_KEY = "key" AUTHKEY_CERT = "cert" AUTHKEY_PKCS11 = "pkcs11" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthKey ¶ added in v0.5.5
type AuthKey struct {
// auth type:
// - key
// - cert
// - pkcs11
Type string
// auth type value:
// - key(path)
// ex.) ~/.ssh/id_rsa
// - cert(path)
// ex.) ~/.ssh/id_rsa.crt
// - pkcs11(libpath)
// ex.) /usr/local/lib/opensc-pkcs11.so
Value string
}
Auth map key
type Connect ¶ added in v0.5.0
type Connect struct {
Server string
Conf conf.Config
Client *ssh.Client
IsTerm bool
IsParallel bool
IsLocalRc bool
LocalRcData string
LocalRcDecodeCmd string
ForwardLocal string
ForwardRemote string
AuthMap map[AuthKey][]ssh.Signer
// contains filtered or unexported fields
}
func (*Connect) CheckClientAlive ¶ added in v0.5.5
Check ssh connet alive
func (*Connect) CreateClient ¶ added in v0.5.3
@brief: create ssh client @note:
support multiple proxy connect.
func (*Connect) CreateSession ¶ added in v0.5.0
@brief: create ssh session
func (*Connect) CreateSshAgent ¶ added in v0.5.3
func (*Connect) RunCmdWithOutput ¶ added in v0.5.1
@brief:
Run command over ssh, output to gochannel
func (*Connect) SendKeepAlive ¶ added in v0.5.5
send keep alive packet
type CopyConInfo ¶ added in v0.5.0
type ExecHistory ¶ added in v0.5.5
type Output ¶ added in v0.5.5
type Output struct {
Templete string
Count int
ServerList []string
Conf conf.ServerConfig
AutoColor bool
// contains filtered or unexported fields
}
Output Prompt
func (*Output) Create ¶ added in v0.5.5
@TODO:
- Text templeteでの処理に切り替え
- Structを作って処理させるように切り替える?
Create OPROMPT
- ${COUNT} ... Count
- ${SERVER} ... Server
- ${ADDR} ... Addr
- ${USER} ... User
- ${PORT} ... Port
- ${DATE} ... Date(YYYY/mm/dd)
- ${YEAR} ... Year(YYYY)
- ${MONTH} ... Month(mm)
- ${DAY} ... Day(dd)
- ${TIME} ... Time(HH:MM:SS)
- ${HOUR} ... Hour(HH)
- ${MINUTE} ... Minute(MM)
- ${SECOND} ... Second(SS)
type P11 ¶ added in v0.5.3
type P11 struct {
Pkcs11Provider string
Ctx *pkcs11.Ctx
Label string
SlotID uint
KeyID map[int][]byte
PIN string
SessionHandle pkcs11.SessionHandle
Signers []ssh.Signer
}
func (*P11) GetCryptoSigner ¶ added in v0.5.3
func (*P11) GetTokenLabel ¶ added in v0.5.3
func (*P11) RecreateCtx ¶ added in v0.5.3
type Run ¶ added in v0.5.0
Source Files
¶
- connect.go
- connect_auth.go
- connect_pkcs11.go
- connect_port_forward.go
- connect_proxy_http.go
- connect_proxy_socks5.go
- connect_proxy_ssh.go
- connect_ssh_agent.go
- pkcs11.go
- run.go
- run_auth.go
- run_cmd.go
- run_outprompt.go
- run_shell.go
- run_shell_cmd.go
- run_shell_complete.go
- run_shell_connect.go
- run_shell_history.go
- run_term.go
- scp.go
Click to show internal directories.
Click to hide internal directories.