Unit testing of internal/sshd/connection.go
!479 (merged) introduces a small test that verifies the rejection data when a passed channel has the wrong type.
Other scenarios can be tackled similarly.
- Too many connections scenario comes down to setting up a connection with zero number of allowed sessions and verifying the rejected data
- Accept returns error scenario comes down to redefining Accept function for fake channel in tests