cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1956
Views
5
Helpful
1
Replies

How I do CLI template in Cisco Prime to enable SSH connection to devices?

cstcom
Level 1
Level 1

I need to enable ssh connection to devices, to do a CLI Template, i have a doubt if i can send "yes" and leght when generate rsa key.

How be the template to next commands?

conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ROUTER(config)#ip domain-name domain.name
ROUTER(config)#crypto key generate rsa
% You already have RSA keys defined named ROUTER.domain.name.
% Do you really want to replace them? [yes/no]: yes
Choose the size of the key modulus in the range of 360 to 2048 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.

How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

ROUTER(config)#ip ssh version 2
ROUTER(config)#ip ssh time-out 120
ROUTER(config)#ip ssh authentication-retries 3
ROUTER(config)#line vty 0 4
ROUTER(config-line)#transport input telnet ssh
ROUTER(config-line)#end
ROUTER#write
Building configuration...
[OK]
ROUTER#

1 Reply 1

Marvin Rhoads
Hall of Fame
Hall of Fame

You can do this using the interactive command feature. The User Guide even cites the specific example you are asking about when describing how this works:

Adding Interactive Commands

An interactive command contains the input that must be entered following the execution of a command.

To enter an interactive command in the CLI Content area, use the following syntax:

CLI Command<IQ>interactive question 1<R>command response 1 <IQ>interactive question 2<R>command response 2
 

where <IQ> and <R> tag are case-sensitive and must be entered as uppercase.

For example:

#INTERACTIVE
crypto key generate rsa general-keys <IQ>yes/no<R> no
#ENDS_INTERACTIVE

Source:

http://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/infrastructure/3-0/user/guide/pi_ug/config-temp.html#47279

Review Cisco Networking for a $25 gift card