Documentation
¶
Index ¶
- Constants
- type AuthKey
- 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 PathSet
- type PipeSet
- type Run
Constants ¶
View Source
const ( AUTHKEY_PASSWORD = "password" AUTHKEY_AGENT = "agent" AUTHKEY_KEY = "key" AUTHKEY_CERT = "cert" AUTHKEY_PKCS11 = "pkcs11" )
View Source
const SSH_AUTH_SOCK = "SSH_AUTH_SOCK"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthKey ¶ added in v0.5.5
type AuthKey struct {
// auth type:
// - password
// - agent
// - 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 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
}
P11 struct for pkcs11 processing.
func (*P11) GetCryptoSigner ¶ added in v0.5.3
GetCryptoSigner return []crypto.Signer
func (*P11) GetKeyID ¶ added in v0.5.3
GetKeyID acquire KeyID via PKCS11 and store it in P11 structure.
func (*P11) GetTokenLabel ¶ added in v0.5.3
GetTokenLabel get pkcs11 token label. and into P11.Label. Only one token is supported.
func (*P11) RecreateCtx ¶ added in v0.5.3
RecreateCtx exchange PKCS11.Ctx with PIN accessible ctx
type PipeSet ¶ added in v0.6.0
type PipeSet struct {
// contains filtered or unexported fields
}
PipeSet is pipe in/out set struct.
type Run ¶ added in v0.5.0
type Run struct {
ServerList []string
Conf conf.Config
// Mode value in
// - shell
// - cmd
// - pshell
Mode string
// tty use (-t option)
IsTerm bool
// parallel connect (-p option)
IsParallel bool
// not run (-N option)
IsNone bool
// x11 forwarding (-X option)
X11 bool
// use or not-use local bashrc.
// IsNotBashrc takes precedence.
IsBashrc bool
IsNotBashrc bool
// local/remote Port Forwarding
PortForwardMode string // L or R
PortForwardLocal string
PortForwardRemote string
// Dynamic Port Forwarding
// set localhost port num (ex. 11080).
DynamicPortForward string
// Exec command
ExecCmd []string
// enable/disable print header in command mode
EnableHeader bool
DisableHeader bool
// contains filtered or unexported fields
}
func (*Run) CreateAuthMethodMap ¶ added in v0.6.0
func (r *Run) CreateAuthMethodMap()
CreateAuthMethodMap Create ssh.AuthMethod, into r.AuthMethodMap.
func (*Run) CreateSshConnect ¶ added in v0.6.0
CreateSshConnect return *sshlib.Connect this vaule in ssh.Client with proxy.
func (*Run) PrintSelectServer ¶ added in v0.6.0
func (r *Run) PrintSelectServer()
PrintSelectServer is printout select server. use ssh login header.
func (*Run) SetupSshAgent ¶ added in v0.6.0
func (r *Run) SetupSshAgent()
Click to show internal directories.
Click to hide internal directories.