This will extract the contents of the previously created backup to /tmp, and then synchronize the /etc/config directory with the copy in /tmp.

One problem that can crop up here is that there is not enough room in /tmp to extract files to. The following command will temporarily increase the size of /tmp:

mount -t tmpfs -o remount,size=2048k tmpfs /var

If restoring to either a new unit or one that has been factory defaulted, make sure that the process generating SSH keys either stops or completes before restoring configuration. If this is not done, then a mix of old and new keys may be put in place.

SSH uses these keys to avoid man-in-the-middle attacks. Logging in may be disrupted.

15.2 Advanced Portmanager

Black Box’s portmanger program manages the console server serial ports. It routes network connection to serial ports, checks permissions, and monitors and logs all the data flowing to/from the ports.

15.2.1 Portmanager commands

pmshell

The pmshell command acts similar to the standard tip or cu commands, but all serial port access is directed via the portmanager.

Example: To connect to port 8 via the portmanager:

#pmshell -l port08

pmshell Commands:

Once connected, the pmshell command supports a subset of the '~' escape commands that tip/cu support. For SSH you must prefix the escape with an additional ‘~’ command (i.e. use the ‘~~’ escape)

Send Break: Typing the character sequence '~b' will generate a BREAK on the serial port.

History: Typing the character sequence '~h' will generate a history on the serial port.

Quit pmshell: Typing the character sequence '~.' will exit from pmshell.

Set RTS to 1 run the command: pmshell --rts=1

Show all signals: # pmshell –signals

DSR=1 DTR=1 CTS=1 RTS=1 DCD=0

Read a line of text from the serial port: # pmshell –getline

pmchat

The pmchat command acts similar to the standard chat command, but all serial port access is directed via the portmanager.

Example: To run a chat script via the portmanager:

#pmchat -v -f /etc/config/scripts/port08.chat < /dev/port08

_____________________________________________________________________

724-746-5500 blackbox.com

Page 245

Page 245
Image 245
Black Box LES1308A, LES1332A, LES1408A, LES144BA, LES1416A Advanced Portmanager, Portmanager commands, Pmshell, Pmchat