Get remote command output on HP router

My task is execute command on different routers.

I’m using golang.org/x/crypto/ssh package

Cisco works fine. But on HP output ends on prompt right before actual command.
Here’s code sample:

 cmd := "dis int brief"
 config := &ssh.ClientConfig{
   User: user,
   Auth: []ssh.AuthMethod{
      ssh.Password(password),
   },
   ...
}
...
conn, err := ssh.Dial("tcp", hostip+":22", config)
session, err := conn.NewSession()
output, err := session.CombinedOutput(cmd)

Here in output I got only text before actual command, like it was previous command buffer, but I’m not getting any errors too.

Is someone knows whats the problem with HP?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.