Search code examples
ciscossh-config

Cant configure ssh connection while using Java


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


Solution

  • By default rsa key name is composed by host name and domain name, and since ssh needs an rsa key in order to work, we need to specifiy a domain name before configuring the rsa key and then the ssh. An rsa key name would be somthing like this:

    You need to change the hostname first with Hostname >name<* in config mode