Documentation ¶
Index ¶
- Variables
- func AuthorizeKey(keyfile, authorizedKeys string) (err error)
- func GenerateKey(bitsize int, keyfile string) error
- func Server(linkname string, force bool) error
- type Config
- type ConfigOption
- func Accept(accept bool) ConfigOption
- func DefaultIdentityFile(homedir string) ConfigOption
- func IdentityFile(file string) ConfigOption
- func KeepAlive(period time.Duration) ConfigOption
- func KnownHosts(file string) ConfigOption
- func Login(username string) ConfigOption
- func PasswordAuth() ConfigOption
- func Port(port int) ConfigOption
- func Timeout(timeout time.Duration) ConfigOption
- type Connection
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.New(ioutil.Discard, "", 0)
Functions ¶
func AuthorizeKey ¶
func GenerateKey ¶
Types ¶
type ConfigOption ¶
func Accept ¶
func Accept(accept bool) ConfigOption
func DefaultIdentityFile ¶
func DefaultIdentityFile(homedir string) ConfigOption
func IdentityFile ¶
func IdentityFile(file string) ConfigOption
func KeepAlive ¶ added in v0.0.4
func KeepAlive(period time.Duration) ConfigOption
func KnownHosts ¶
func KnownHosts(file string) ConfigOption
func Login ¶
func Login(username string) ConfigOption
func PasswordAuth ¶
func PasswordAuth() ConfigOption
func Port ¶
func Port(port int) ConfigOption
func Timeout ¶ added in v0.0.4
func Timeout(timeout time.Duration) ConfigOption
type Connection ¶
func Connect ¶
func Connect(hostname string, options ...ConfigOption) (*Connection, error)
func (*Connection) AttachPTY ¶
func (conn *Connection) AttachPTY(localDev string, exec string, force bool) error
func (*Connection) Close ¶
func (conn *Connection) Close() error
func (*Connection) Wait ¶ added in v0.0.4
func (conn *Connection) Wait()
type PrivateKey ¶
type PrivateKey struct {
*rsa.PrivateKey
}
func NewPrivateKey ¶
func NewPrivateKey(bitsize int) (*PrivateKey, error)
func (*PrivateKey) MarshalPEM ¶
func (pk *PrivateKey) MarshalPEM() ([]byte, error)
func (*PrivateKey) PublicKey ¶
func (pk *PrivateKey) PublicKey() (*PublicKey, error)
type PublicKey ¶
func NewPublicKey ¶
func (*PublicKey) MarshalBinary ¶
func (*PublicKey) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.