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?