openssl is case sensitive first of all and second the command may not be in your path depending on the method used to acquire the root login.
I would login as root and run
locate openssl | more
to find the location of the binary. Then adjust your command to include the full path to openssl.
On my server it is located in /usr/bin/openssl
And please edit the subject line, and the first line of the OP, to correctly reflect what we are talking about here. SSH is a secure shell environment where SSL is Secure Sockets Layer; the two are not even remotely related.