...
To create a new phrasebook, make a new directory in the phrasebooks directory hierarchy located at /usr/local/omk/conf/phrasebooks
, and place a text file named pb inside of it. You now have a new personality/phrasebook with the name of the new directory that was created. If the directory was created at the base of the hierarchy the pb is truly empty and defines nothing, if it was in a subdirectory then the pb currently has the contents of the base directories pb.
The next step is to determine what should be in the phrasebook, this is the difficult part.
Here Below is an algorithm to solve the problem.Add a node to opConfig, set
Node creation in opConfig is documented HERE: opConfig Configuration Guide
Second - Set the personality to the new personality created , set
To do this navigate to menu -> System -> Edit Nodes. Select the desired node from the list. In the settings menu on the left of the page select "Connection". There is a drop down menu next to personality, from here select the newly created personality from the list as shown in the image below.
Third - Set the transport and credentials to be correct.
While not working do Ensure you have access to a device and are able to manually SSH or telnet to it and that you are authorized to do so. This is done by selecting the Transport drop down menu and selecting SSH or Telnet. Your credential set created for the device is also shown in the drop down menu next to "Credential Set" shown in the image above. This is documented more extensively HERE: Adding a new device to be supported by opConfig
If this is not working follow these steps:
- Attempt a test_connect to the node in question (debug=9 is important here)
- /usr/local/omk/bin/opconfig-cli.pl act=test_connect node=NODE_NAME debug=9
- Inspect the debug output, (it may work best to pipe the output to a file for inspection)
- the bottom line may give you information about the problem, eg:
- Error, connection test returned "Authentication Error", error message "login failed to remote host - prompt does not match"
- Look top down, attempting to figure out how far the terminal session got
- Look for lines like, they indicate prompts working and macros being run:
- [ 3.095807] pr hit, matches prompt pass
- [ 3.994504] pr hit, matches prompt generic
- [ 4.264275] en running macro begin_privileged
- Look for lines like, they indicate prompts working and macros being run:
- You should now have a bit of an idea how far the connection attempt got
- Now look bottom up for where it failed, search for "pr failed:" or scroll through and look where the same output starts repeating, eg:
-bash-4.1$
[ 4.475526] pr nope, doesn't (yet) match connection_error
[ 4.475725] pr nope, doesn't (yet) match generic
[ 4.475914] pr nope, doesn't (yet) match pass
[ 4.476100] pr nope, doesn't (yet) match privileged
[ 4.476274] pr nope, doesn't (yet) match user
[ 4.476398] pr no match so far, more data?
[ 15.478110] pr failed: [read timed-out at /usr/local/ActivePerl-5.16/site/lib/Net/CLI/Interact/Transport/Wrapper/Net_Telnet.pm line 35
- Now figure out which prompt is failing to match, or which macro command is not working (eg, sudo -Hi bash may not work on your server but su - will)
- Change the prompt or macro, go back to step 1
...