First you need a IOS image that supports SSH on your router.
Then you need some terminal application with the same support.
To generate keys (enter in global): cry key generate rsa
Then to limit the access vty with only SSH (enter in line vty): transport input ssh
Then there are some optional commands to tweak SSH as you desire.