I tried to follow procedures for using private/public keys to establish a secure shell connection with my SME server & they did not work on OS X 10.4.8
This procedure worked for me:
Open terminal & type in the following:
# ssh-keygen -d
this will generate a DSA key with optional passphrase.
The nest step is what is missing from all the ssh key procedures i've found and is specific to OS X. This will copy your key to the location of the root account's identity so you can ssh into the server. You have to be a super user to write files to that directory, & the first time you use sudo in terminal, it will prompt for your OS X admin password:
# sudo cp - p ~/.ssh/id_dsa /var/root/.ssh/
# sudo cp - p ~/.ssh/id_dsa.pub /var/root/.ssh/
Then transfer the public key contents to the server:
# sudo scp ~/.ssh/id_rsa.pub your.servers.name.or.IP:/root/.ssh/authorized_keys2
It will prompt you for root's password, enter it.
Try it out:
# sudo ssh your.servers.name.or.IP
You should be logged in without a password prompt.
For further security, go to the SME server-manager & under the Secure Shell Section of the Remote Access panel, choose NO for the option to 'Allow secure shell access using standard passwords'. This will only enable entering the shell remotely using keys.
Please note that this procedure uses the root account to access the secure shell. i believe that is the only account that is enabled by default on SME. that is why you had to copy the DSA keys to /var/root folder on your mac.
If anyone knows how to make a regular user on SME become a super user able to access the secure shell, please post a how to.
Thank you, hope this is helpful!