Depending on the command you used to create the key this would determine whether or not you would have been prompted to set a passphrase with the ssh key.
using this command in the terminal will generate a key and you will prompted you set a password but if you press enter without setting a password it carries on and generates the key without setting a password.
ssh-keygen -b 1024 -t dsa
If you ran the same command but added and extra function then it wont prompt you to set a password. either way you can easily generate the key without a password.
ssh-keygen -N "" -b 1024 -t dsa
copy your public key 'id_dsa.pub' into the autorized_keys2 file on your server
If you don't already have an authorized_keys2 file first of all copy your id_dsa.pub to your desktop
Then your terminal use the command
cat ~/Desktop/id_dsa.pub >> ~/.ssh/authorized_keys2
Then test your connection from your remote client
ssh myserver.local
change myserver.local for the actual server address.
If this lets you log in without asking for password then your key is working.
Then you can secure the ssh server by editing /etc/sshd_config
uncomment and change the following lines as necessary:
SyslogFacility AUTHPRIV
LogLevel INFO
PermitRootLogin no
StrictModes yes
MaxAuthTries 6
PermitEmptyPasswords no
PubKeyAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys2
RSAAuthentication no
RhostsAuthentication no
PasswordAuthentication no
ChallengeResponseAuthentication no
then save the /etc/sshd_config
To test your setup from your remote device rename your private key to id_dsa.test
then initiate the connection to the server you should now get the message 'permission denied public key'
then rename your private key back to id_dsa
and this time your connection will work.