This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

ssh_util

    import "github.com/analog-substance/carbon/pkg/ssh_util"
    

    Index

    type Session

    type Session struct {
        Session *ssh.Session
        Client  *ssh.Client
        // contains filtered or unexported fields
    }
    

    func NewSession

    func NewSession() (*Session, error)
    

    func (*Session) ClientConfig

    func (session *Session) ClientConfig(user string) *ssh.ClientConfig
    

    func (*Session) Close

    func (session *Session) Close()
    

    func (*Session) Connect

    func (session *Session) Connect(serverAddr, user string) error
    

    func (*Session) ForwardAgent

    func (session *Session) ForwardAgent() error
    

    func (*Session) ForwardLocalPort

    func (session *Session) ForwardLocalPort(localPort, remotePort int) error
    

    func (*Session) Output

    func (session *Session) Output(cmd string) (string, error)
    

    Output uses ssh_util.Session to run cmd on the remote host and returns its standard output.