Launching telnet client from confd_cli

From QEMU, confd_cli is invoked. IT has built-in ssh/telnet commands.

1.Does the clistart.c invoke these functionality??
2.Telnet localhost from confd_cli invoked from QEMU always fails??

  1. clistart.c, i.e. the confd_cli program, does not use the SSH or Telnet commands. It connects using TCP to ConfD using the confdIpcAddress. The ConfD IPC address is set in the ConfD configuration file (i.e. confd.conf) /confdConfig/confdIpcAddress/ip (default value 127.0.0.1) and /confdConfig/confdIpcAddress/port (default value 4565).

  2. Since the confd_cli program does not use Telnet, confd_cli works fine on QEMU or any other environment that support TCP or a user implemented IPC mechanism.
    See cli_connect() in $CONFD_DIR/src/confd/cli/clistart.c
    If you run the ssh or telnet commands from the ConfD CLI, you are essentially running the ssh or telnet command that the Linux version you are running in QEMU provide. So if the telnet or ssh command fail for your QEMU installation, it will fail the same way way you run the command from your Linux terminal.
    See for example $CONFD_DIR/src/confd/cli/confd.cli $CONFD_DIR/examples.confd/intro/1-2-3-start-query-model/commands-c.cli
    This is a command line interface (CLI) extension file. It for example defines telnet and ssh commands usable in the CLI.

Note that you can change the IPC mechanism if you do not wish to use TCP. See ConfD UG “Using a different IPC mechanism”.

A bit more info is available in the confd_cli man page: $CONFD_DIR/man/man1/confd_cli.1