Fix thread exhaustion in SSH daemon
Merged #89 "SSH daemon is exhausting threads"