/etc/init.d/65-sshd ... restart choice, runs through a ... stop; sleep 1; start ... sequence. However if invoked remotely, via ssh, then after the stop the link is disconnected and the start isn't invoked, leaving the 'remote' system with no sshd running and you can't ssh back into to start it
One option to fix that might be to have a sub-directory beneath /etc/init.d, where a script to stop/restart sshd is nohup/background invoked within 65-sshd when the restart option is being run.