i use this commands to configure ssh on router (via java). i cant seem to get it working (don't know the error)
router# aaa new-model username cisco password 0 cisco
router#ip domain-name rtp.cisco.com
router#crypto key generate rsa
router#ip ssh time-out 60
router#ip ssh authentication-retries 2
router#line vty 0 4 transport input SSH