I'm having issues pushing a new banner to our Cisco devices using a config change script.
If I tick the "keep whitespace" box the script always fails with "Connection Refused", even though the banners are uploaded to the switch.
Because it fails, it's never written to NVRAM.
If I don't tick the box, the script succeeds, so the changes are written to NVRAM, but the formatting is lost.
Any ideas?
Template below
/*
.CHANGE_TEMPLATE_DESCRIPTION
Change to Standard Config on Cisco IOS devices
.CHANGE_TEMPLATE_TAGS
Cisco
.PLATFORM_DESCRIPTION
Cisco IOS
.PARAMETER_LABEL @ContextNode
NCM Node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
*/
script StandardConfigCiscoIOS (
NCM.Nodes @ContextNode )
{
CLI
{
configure terminal
banner login ^
THIS DEVICE FORMS PART OF A PRIVATE NETWORK
---------------------------------------------
**************************************************
* Unauthorised access or use of this equipment *
* is prohibited and constitutes an offence under *
* the Computer Misuse Act 1990. If you are not *
* authorised to use this system then you must *
* terminate this session now! *
* *
* * W A R N I N G * *
* ------------- *
* *
* All connections to this equipment are logged *
* for security purposes and may be used in any *
* subsequent criminal computer investigation. *
**************************************************
^C
banner exec ^
THIS DEVICE FORMS PART OF A PRIVATE NETWORK
---------------------------------------------
**************************************************
* Unauthorised access or use of this equipment *
* is prohibited and constitutes an offence under *
* the Computer Misuse Act 1990. If you are not *
* authorised to use this system then you must *
* terminate this session now! *
* *
* * W A R N I N G * *
* ------------- *
* *
* All connections to this equipment are logged *
* for security purposes and may be used in any *
* subsequent criminal computer investigation. *
**************************************************
^C
exit
}
}