SkillAgentSearch skills...

Nccm

No description available

Install / Use

/learn @flyingrhinonz/Nccm
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

NCurses ssh Connection Manager (nccm)

Copyright (C) 2021+ Kenneth Aaron.

Freedom makes a better world: released under GNU GPLv3.

https://www.gnu.org/licenses/gpl-3.0.en.html

This software can be used by anyone at no cost, however, if you like using my software and can support - please donate money to a children's hospital of your choice.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation: GNU GPLv3. You must include this entire text with your distribution.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About nccm

  • Simple yet powerful ncurses ssh connection manager.
  • No unnecessary features or bloatware - do one thing and do it well.
  • Intuitive filtering by all text you supply.
  • Well documented.
  • Secure.
  • Logs are in English - you don't need to be a developer to read the majority of the logs.
  • nccm has reached a stable state with no known bugs when running on pure Linux (developed and tested on the latest stable version of Debian). I will continue to fix bugs that I can recreate on the latest clean-install stable version of Debian, and only add features that are in the spirit of nccm.

Who is nccm for?

  • You have dozens or thousands of boxes to manage via ssh.
  • Too hard to remember server hostnames or IP addresses and prefer descriptive names?
  • You use ssh connection arguments on the command line and it's too much effort to type every time you connect.
  • View all your devices at once and filter easily so that you know who to connect to.
  • Want to focus more on your job and less on the overhead of connecting to your devices?
  • Prefer to work from the command line, don't have a GUI, or simply prefer to work more efficiently?
  • Need a simple tool to do its job reliably and securely without unnecessary features to slow you down?
  • Need an optional log that is replayable identically to what you saw on your terminal?
  • If you answered 'yes' to any of the above - nccm is for YOU!

Manual install instructions

This is the easiest way to install nccm, you can of course install and use nccm in any way you wish.

  • Clone the project from the git repository: git clone https://github.com/flyingrhinonz/nccm nccm.git
  • cd nccm.git/nccm/
  • sudo install -m 755 nccm -t /usr/local/bin/

The ssh connections/config file nccm.yml should be copied to any one of the following locations, and is loaded from the first location found in the following order:

  • ~/.config/nccm/nccm.yml
  • ~/.nccm.yml
  • ~/nccm.yml
  • /usr/local/etc/nccm.yml
  • /etc/nccm.yml

Tips on nccm.yml location - if you're a single user then placement of nccm.yml doesn't matter and it's probably easiest to place it in one of the home dir locations ( which also saves you the effort of using sudo to edit files in /etc/ ). In a multiuser system, placing nccm.yml in each user's home dir will allow each user to use their personalized settings if nccm.yml is present, and if not present then fallback to default settings from /etc/nccm.yml . It is also possible to put your real nccm.yml anywhere you wish and make a symlink to it from one of the paths mentioned above. Also refer to nccm_config_importnccmd setting which allows you to import and merge connection details from /etc/nccm.d/ .

nccm requires Python3 to be installed on your machine, which should already be present on most Linux boxes. Most Python library dependencies are already present as part of Python3 however the following may not be present in which case you need to install them manually.

On Debian or similar use apt: If you want to only use the distro's packages you can do:

  • sudo apt install python3-yaml yamllint

Or if you prefer to install PyYAML from pip3:

  • sudo apt install python3-pip yamllint
  • pip3 install --user PyYAML

On Fedora or similar use dnf:

  • sudo dnf install python3-pip yamllint
  • pip3 install --user PyYAML

Before starting, edit the nccm.yml file and add your own ssh connections. Formatting YAML is easy and the file you downloaded from the project page is well documented and has examples of every supported scenario. Follow the structure in the file - provide the connection name at the beginning of a line and sub config items indented by two spaces. Every subsequent nesting level gets a further indent of two spaces. Don't forget the colons - these are part of the YAML language. Avoid using tabs because on the screen they expand and look like 8 spaces but are actually one character from a yaml perspective and will break your config.

Don't worry about ordering your SSH session blocks in any specific way (unless you're keeping the file tidy for editing purposes) because nccm gives you "sort by" options within the program as well as filtering. Actually nccm is designed around filtering and this is the most efficient way to find your connection - I never bother sorting - I just use the filter.

Once you've finished editing, check your work with yamllint:

  • yamllint nccm.yml

If no errors are returned, then you've formatted your file correctly, and it's safe to continue.

If nccm is accessible from your path and is executable, typing nccm is all that's required to launch the TUI (terminal user interface). If you see Python 3 exceptions, check whether you have satisfied the dependencies. Any exceptions should mention any package that's missing. Tip - normally the most useful information in a python exception is at the end of the output.

nccm.yml settings

This file is mostly used for ssh connection details, but also supports program settings described in this chapter. nccm fully respects your privacy and security - and all defaults are set to values that protect your privacy and security. It is your choice to change them as you see fit.

These are global settings, affecting all sessions.

nccm_config_controlmode:

Controls the cursor movement mode. Two modes are supported:

  • std: Cursor keys move the marker as expected.
  • focus: Marker and list move independently. The list is designed to move while the marker remains fixed unless it is moved manually.

nccm_config_loglevel:

Controls log level of messages sent by nccm to syslog. If you are using systemd it usually captures syslog messages which you can read in journalctl. I will use the word syslog in this documentation as referral to both. Use this for debugging. Default level is info. Supported levels: debug, info, warning, error, critical .

nccm_config_logprivateinfo:

Controls whether you want syslog/journal to include private information such as usernames & hostnames. By default this is set to false which results in the data being replaced with CENSORED in the logs. Note - you will still see CENSORED items for all lines that are logged before this setting has been read from nccm.yml . You can also bypass censorship temporarily by supplying the command line argument: --logprivateinfo . This also solves the problem of censored logs that occur before the nccm_config_logprivateinfo setting is loaded. When this is enabled you will see: LogPrv in red in the help line at the bottom of the screen.

nccm_config_keepalive:

Sends a message through the encrypted channel every n seconds (0 to disable) to prevent idle sessions from being disconnected. You can customize this on a per-connection basis by using the setting keepalive: n (optional).

nccm_default_ssh_port:

Works alongside the setting: nccm_force_default_ssh_port and if: nccm_force_default_ssh_port == true , then the value of: nccm_default_ssh_port will be forced upon connections that don't have their own: port: SERVER_PORT setting (which is always respected). If: nccm_force_default_ssh_port == false , then the value of: nccm_default_ssh_port will have no effect.

nccm_force_default_ssh_port:

Works alongside: nccm_default_ssh_port and explained above.

nccm_config_identity:

For public key authentication, normally ssh will load your private key from the default locations. You can force ssh to use your own file by putting it's path here. Or set to false to let ssh do it's own thing. You can customize this on a per-connection basis by using the setting identity: path (optional).

nccm_config_sshprogram:

By default nccm will use the ssh program as found in your path. If you want to explicitly set the path to ssh, or you want to use a different program - set it here. This is a global setting that affects all your connections.

nccm_config_promptuser:

By default set to false and nccm will connect immediately to the selected server. Set this value to true if you want nccm to prompt the user to press Enter before a connection is made and once again before returning to nccm. If using pre/post connection scripts (disabled by default) the prompt is shown before the preconnection script is run and once again after the post connection script is run.

nccm_config_importnccmd:

This setting defines whether nccm should try to import any yml files it finds in /etc/nccm.d/ . Useful in a multiuser env where each user can have their own nccm.yml as well as shared connection details files. These filenames should end in .yml and can on

View on GitHub
GitHub Stars149
CategoryDevelopment
Updated1d ago
Forks28

Languages

Python

Security Score

90/100

Audited on Mar 28, 2026

No findings