In summary of some of the comments on the other answers. This is the full magic incantation you need:
openssl genrsa -traditional -out server.key 2048 openssl rsa -traditional -RSAPublicKey_out -in server.key -out public.key