In order to set the banner using the ccs script, you will need to add a carriage return to the end of each line so that the whole string is entered at once. This needs to be done since the ccs script is expecting a prompt before sending the next command, but the cisco enters an editor type of session where it expects the escape character before returning to the prompt. Here is an example of accomplishing this:
conf t
banner login X
\cm****************************************************************************\cm
\cm This is a private computer system, which may be accessed and used only by
\cm authorized personnel. \cm
\cm****************************************************************************\cm
X\cm
end
wri
Note: The banner login line all the way to the X\cm is 1
line
Output:
QAdynrtr1022#enable
QAdynrtr1022#terminal no monitor
QAdynrtr1022#terminal length 24
QAdynrtr1022#terminal no editing
QAdynrtr1022#conf t
Enter configuration commands, one per line. End with
CNTL/Z.
QAdynrtr1022(config)#banner login X
Enter TEXT message. End with the character 'X'.
****************************************************************************
This is a private computer system, which may be
accessed and used only by
authorized personnel.
****************************************************************************
X
QAdynrtr1022(config)#
QAdynrtr1022(config)#end
QAdynrtr1022#wri
Building configuration...
[OK]
QAdynrtr1022#
Shawn