This works for generating CSR files required by GoDaddy SSL certificates. This will work with more than just GoDaddy SSL certificates, you can even sign your own certificates.
$ openssl genrsa -des3 -out domain.key 2048
You will now have to enter a passphrase
$ openssl req -new -key domain.key -out domain.csr
You will now have to re-enter your passphrase to confirm, and then you will be prompted to enter all your information.
Enter the domain name you are registering this certificate for when it prompts you:
Common Name (eg, YOUR name) []
You will now have the CSR file you need to send to the signing authority to issue you your certificate.
Here is the code to generate the CRT file ( if you’re not using GoDaddy and you want to sign your own )
openssl x509 -req -days 365 -in domain.csr -signkey domain.key -out domain.crt