Sometimes, cPanel/WHM blocks your SSH connection. When this happens, you need to reset your SSH connection via cPanel/WHM.
You can use following link for resetting your SSH connection.
http://YOURserverIP:2086/scripts2/doautofixer?autofix=safesshrestart