Exit sends an exit status to the client and closes the session.
(code int)
| 193 | |
| 194 | // Exit sends an exit status to the client and closes the session. |
| 195 | func (s *Session) Exit(code int) error { |
| 196 | err := s.sess.Exit(code) |
| 197 | s.Close() |
| 198 | return err |
| 199 | } |
| 200 | |
| 201 | // Stderr returns an io.Writer for the SSH stderr channel. |
| 202 | func (s *Session) Stderr() io.Writer { |