ssh is a ssl-secured remote shell invocation utility, not a login shell!
Login shells are sh,bash,ksh,zsh,ash,dash,...
Most LUnix have a list of the allowed login shells in /etc/shells, that prevents picking a wrong shell.
Looks like you have locked out root.
You can try
and change to /bin/sh
If that fails you need to boot a rescue system.