mirror of
https://github.com/shanghai-edu/multissh.git
synced 2025-12-16 21:37:50 +00:00
fix ssh connect bug on h3c switchs
This commit is contained in:
parent
2fcf4256d8
commit
016cb92489
2 changed files with 20 additions and 10 deletions
|
|
@ -50,6 +50,15 @@ func connect(user, password, host string, port int) (*ssh.Session, error) {
|
|||
if session, err = client.NewSession(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
modes := ssh.TerminalModes{
|
||||
ssh.ECHO: 0, // disable echoing
|
||||
ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud
|
||||
ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud
|
||||
}
|
||||
|
||||
if err := session.RequestPty("xterm", 80, 40, modes); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return session, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue