ssh-keygen -t dsa
You will be prompted with a series of questions, just press the return key to accept the default value for each question.
You will end up with two files on your device:
"id_dsa" is the private key. "id_dsa.pub" is the public key (note the ".pub" at the end of the file name, short for "public").