Absolutely yes, because a DDoS attack is designed to overwhelm server resources. Meaning your load average shoots up & your memory is maxed to the point of swapping out to disk. And it does not have to be just an attack on port 22. I have managed tons of web servers that become unreachable due to the scenario I describe above.
The best solution to an issue like that is to login via a remote console that is closer to the machine than via SSH. Like on cloud server setups where you have an option of launching a Java-based terminal. But that—of course—is based on you having access like that.
The other alternative is to painfully wait for the SSH connection to happen while your server is being DDoS'ed. Sometimes it works. But sometimes I have to open up a handful of windows and see which one gets through first.
EDIT: And if you want to proactively detect if your system is using up resources, I highly recommend using Monit. I use a script like this in Monit which does two things in addition to e-mailing me when something happens. One it detects if your web server is unreachale (aka: down) and automatically restarts it. But for you perhaps the loadavg
area makes the most sense. I have it set to 7 here & it attempts to restart the server to flush out connections & attempt to get it back in control if the load average is consistently at 7 or above. Doing things like using Monit pretty much assures you have a better grip on a DDoS when it happens.
check process apache with pidfile /var/run/apache2.pid
start "/etc/init.d/apache2 start"
stop "/etc/init.d/apache2 stop"
if failed host 127.0.0.1 port 80
with timeout 15 seconds
then restart
if loadavg (1min) greater than 7
for 5 cycles
then restart
alert username@myserver.com only on { timeout, nonexist, resource }