Setting up yp-shell
yp-shell, the embedded CLI for the netconfd-pro server, runs by default when the server is started unless you include the "--with-yp-shell=false" parameter.
In order to integrate yp-shell into the server's system we will follow the steps explained in the "yp-shell -- adding a CLI" section of the yumapro-installation-guide.
Root permission is required to fully integrate yp-shell, please consult your System Administrator as necessary.
In order to integrate the yp-shell program into the system so it will be used by OpenSSH, the following installation steps must be made:
1) Add yp-shell to the /etc/shells file
The file /etc/shells must be edited with root access. The line /usr/bin/yp-shell needs to be added anywhere to the /etc/shells file.
We can open a text editor to add /bin/yp-shell to /etc/shells manually, or we can run this command:
mydir> echo '/usr/bin/yp-shell' | sudo tee -a /etc/shells
The following example file shows yp-shell added at the end. The system may need to be rebooted to activate the new shell.
# /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash /bin/csh /bin/tcsh /usr/bin/yp-shell
2) Create a login user for yp-shell, or change the default shell of an existing user to yp-shell
In this example the user 'cli' is being created (the -m option creates a home folder for the new user):
mydir> sudo useradd -m --shell /usr/bin/yp-shell cli
Next create a password for your new user:
mydir> sudo passwd cli
Or, if the user account you wish to use as the CLI login already exists, then use the chsh command instead.
(NOTE: chsh dictates that the user can ONLY use the specified shell. Therefore DO NOT perform this command on a user that needs to access a bash terminal or ANY other type of shell other than yp-shell):
mydir> sudo chsh --shell /usr/bin/yp-shell cli
3) login to the netconfd-pro server
Before logging in make sure that the netconfd-pro server is running and that yp-shell CLI is enabled with the yp-shell true parameter (it is by default).
A normal SSH login should invoke the yp-shell program when the user logs into the system:
mydir> ssh cli@localhost
After entering your password you will be connected to netconfd-pro via yp-shell.
If you want to login to netconfd-pro as a non-CLI user you should use yangcli-pro, YumaPro's NETCONF manager client that is designed to manage multiple NETCONF servers at once.
yp-shell and yangcli-pro share many of the same commands and features. The commands for the two are listed in: What is the difference between yp-shell in netconfd-pro and yangcli-pro?