_, err := channel.SendRequest(keepaliveRequest, true, nil)
if err != nil {
// Connection is gone
+ logger.Printf("[%s] Keepalive failed, closing terminal: %s", term.Conn.RemoteAddr(), err)
term.Close()
return
}
// Make a terminal from the first session found
for ch := range channels {
if t := ch.ChannelType(); t != "session" {
+ logger.Printf("[%s] Ignored channel type: %s", conn.RemoteAddr(), t)
ch.Reject(ssh.UnknownChannelType, fmt.Sprintf("unknown channel type: %s", t))
continue
}