npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mqtt-port-forward-cli

v0.0.6

Published

cli tools for mqtt-port-forward module

Downloads

7

Readme

MQTT Port Forwarding command line tools


This project provides some basic command line tools to manage and create a MQTT port forwarding setup.

It uses the package mqtt-port-forward.

For more details on the process, see the above module.

This cli works with the AWS IoT broker service.

Please note that the cli have only been tested on a linux platform. (ubuntu)

Table of Contents

Install

$ npm install -g mqtt-port-formward-cli

Usage

There are 2 main commands:

  1. aws-configure-access
  2. mqtt-port-forward

Each command provides basic help (eg: aws-configure-access --help)

Example

Say you have a device in the field, and you want to be able to ssh to it from your computer. It has sshd configured, to accept only connection from localhost on port 22.

To achieve this, you need to establish an MQTT topic to forward the ssh requests.

A service is needed to be running on the device, listening for MQTT messages, which it then forwards to the local sshd service.

On your computer, you have another service, that listens on a specific port (say 2222), and when a connection it established, it will forward the connection, via MQTT topic, to the device.

Thus, you now have a ssh session over your secure MQTT connection.

The following, show the steps to simulate this process on your own computer, using AWS's Iot broker service.

  1. First create a private key pair, to access the AWS Iot Broker
  aws-configure-access create mydevice

The above command requires you have the aws cli tools setup and configured to access your AWS account.

It will create a new Iot certificate and policy to allow for publishing on a specific topic (mydevice/tunnel/+/+).

The private key and certificate will be downloaded to your computer.

  1. Start the incoming port forwarding service
  DEBUG=mqtt:pf:info* mqtt-port-forward.js in mydevice

NB: The DEBUG environment just enables some basic logging - without it, you will not see any logging.

  1. In another terminal session, start the outgoing port fowarding service
  DEBUG=mqtt:pf:info* mqtt-port-forward.js out mydevice
  1. And now, you can establish an ssh session to your local computer, but thru the MQTT port forwarding
ssh -p 2222 127.0.0.1

License

MIT © Dean Netherton