// RunCommand executes the provided command on the remote machine configured in
// this Client object. A new Session is created for each call to RunCommand.
// A Client supports multiple interactive sessions.
RunCommand executes the provided command on the remote machine configured in
this Client object. A new Session is created for each call to RunCommand.
A Client supports multiple interactive sessions.
// RunCommand executes the provided command on the remote machine configured in // this Client object . A new Session is created for each call to RunCommand . // A Client supports multiple interactive sessions .
func (c *Client) RunCommand(command string, stdin io.Reader) (string, error) {
	log.Debugf("running command: %s", command)
	return c.handleSessionIO(func(session *ssh.Session) error {
		session.Stdin = stdin
		return session.Start(command)
	})
}
func ( c * Client ) RunCommand ( command string , stdin io . Reader ) ( string , error ) { log . Debugf ( " " , command ) return c . handleSessionIO ( func ( session * ssh . Session ) error { session . Stdin = stdin return session . Start ( command ) } ) }
RunCommand executes the provided command on the remote machine configured in
this Client object.
RunCommand executes the provided command on the remote machine configured in this Client object .