I use the <R> for interaction, like:
CLI Command<R>command response 1 <R>command response 2
(LMS2.6, RME4.0.6 on Solaris)
I would like to do the configuration like this:
Enter configuration commands, one per line. End with CNTL/Z.
NRCC7002(config)#crypto key generate rsa general-keys label ssh-key
% You already have RSA keys defined named ssh-key.
% 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 : 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...[OK]
NRCC7002(config)#ip ssh rsa keypair-name ssh-key
Therefore I use:
crypto key generate rsa general-keys label ssh-key <R>yes <R>2048
ip ssh rsa keypair-name ssh-key
Now, I get a message:
Command(s) failed on the device TFTP: Failed on the device. Insufficient no. of interactive responses(or timeout) for command: crypto key generate rsa general-keys label ssh-key . Could not synchronize RME archive with Device Config
The key generation can take over 30 seconds. So could that be a reason that the config fails. Is there a way to announce netconfig to wait long enough on the second interaction ?