SSH_OPEN_RESOURCE_SHORTAGE
SSH_OPEN_RESOURCE_SHORTAGE (4) is sent when the server cannot open the requested channel due to resource exhaustion. The server is out of memory, file descriptors, or has hit its maximum channel count. The server is willing but unable to service the request at this time.
Code
4
Category
Channel Failure
Standard
RFC 4254 §5.1
Description
SSH_OPEN_RESOURCE_SHORTAGE is the SSH channel layer's equivalent of HTTP 503 or Linux ENOMEM/EMFILE. The server has reached a resource limit that prevents opening a new channel even though the request is otherwise valid and permitted.
Practical triggers: the SSH server process has hit its file descriptor limit (each channel requires at least one file descriptor for the pty or socket), the server is out of virtual memory for the new channel's buffer allocations, or the server has hit the maximum number of concurrent channels per session (typically a very high number in modern SSH servers).
This code is rare under normal operation. Seeing it frequently indicates either a resource leak in the SSH server (channels not being closed after use) or a deliberate channel-flooding attack attempting to exhaust server resources.
Common Causes
- –SSH server process hit file descriptor limit (ulimit -n)
- –Server out of memory for new channel buffer allocations
- –Maximum concurrent channels per session reached
- –Channel resource leak in SSH server (unclosed channels accumulating)
- –Channel flooding attack exhausting server resources