How to add licence key without GUI

Stepan

How to add licence key without GUI   17 July 2026, 12:23

Hello,
In the Port Mapper manual I found this:
Quote

To apply a licence key to the console version, copy the key’s contents between the tags as shown below and save it as a *.key file with the same name as the console executable. Usually it will be NSMapCon.key.

but I don’t know where I should put the key. Next to the binary?
$ which nsmapcon
/usr/bin/nsmapcon
When I used licensed software on headless virtuals before, usually the software would have some switch, then read the key from input and save it by itself somewhere where it can find it.


Also I found a little strange thing: I forgot to open firewall for the Linux host I'm testing from and I got:
$ ./nsmapcon -switch:cbs350-o3.avtg.cz:3:softperfect:authPriv:sha1:shashashashahsa:aes:aesaes -column:"port id, port name, mac address, vendor"
Port ID Port name MAC address Vendor
======= ========= =========== ======
$
I would expect something like "can't connect" and no header.

Thank you,
Stepan
SoftPerfect Support forum - Ann avatar image
Ann

Re: How to add licence key without GUI   17 July 2026, 12:49

Thank you for the detailed feedback. Both your points led directly to some improvements. Here are your options:

1. Applying the licence key

Option A - with your current installation (without updating).

The console looks for the licence in a plain file named same as the executable but with a '.key' extension, sitting next to it. Since your binary is '/usr/bin/nsmapcon', save the key as '/usr/bin/nsmapcon.key' (this needs root):
sudo tee /usr/bin/nsmapcon.key >/dev/null <<'EOF'
------ KEY BEGIN KEY ------
...your key's contents...
------ KEY END KEY ------
Paste the key exactly as you received it, including the BEGIN/END lines. The next run will pick it up.
If you'd prefer not to touch '/usr/bin', you can instead drop it as a '.lic' file in '~/.config/SoftPerfect/Switch Port Mapper/', which the console also scans.

Option B - update to the latest build (recommended).

You were right to expect a switch that simply takes the key and stores it - we've just added exactly that in the latest build and updated the user manual. In the new build you can simply run:
nsmapcon -license:/path/to/yourkey.txt
It validates the key and saves it automatically (under '~/.config/…'), so you never have to work out where it goes.


2. The missing "can't connect" message

You are right, printing only the header with no error was not helpful. This is fixed in the latest build too: when the switch doesn't answer (blocked by firewall, wrong credentials, or an unreachable host), the console now prints a clear message such as "No SNMP response from … - check connectivity, firewall (UDP 161) and credentials" and returns a non-zero exit code, instead of an empty table.

Thanks again for taking the time to report this - it made the product better.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **     **  ********   ******   **     **  **     ** 
 **     **  **        **    **  **     **  **     ** 
 **     **  **        **        **     **  **     ** 
 **     **  ******    **        *********  **     ** 
  **   **   **        **        **     **  **     ** 
   ** **    **        **    **  **     **  **     ** 
    ***     **         ******   **     **   *******  

Message: