Reenvisioning SSH with ShellHub

Network Tweaks

To connect to your ShellHub server from outside the LAN, assign a static IP address to the machine running ShellHub. Then follow the router's manual for how to configure port forwarding on TCP port 22 for traffic addressed to the ShellHub server. (TCP port 22 is the default port for SSH, but you can also change the port assignment using the Docker Compose YAML file.) You only need to configure remote access through the firewall to the ShellHub server, and then you can connect to other devices on your LAN via ShellHub.

I made a point of mentioning the localhost change that you'll need to make. Aside from the simple router change, the other thing to do is, where possible, add a local alias for the ShellHub server's IP address in the /etc/hosts file on any devices that are running a ShellHub agent. Or, you could, of course, create a DNS entry somehow that points at the static LAN IP address. Adding a reference to the ShellHub server in the host's file or a DNS record will allow you to address the server by hostname rather than IP address.


Now that you have walked through the quick and simple setup of ShellHub, I hope you will be tempted to use it. It's slick, lightweight, and under active development. ShellHub lets you access multiple devices on your LAN through SSH with minimal firewall complications. You could also use ShellHub within the LAN itself, with no public access, if you just need a way for local devices to communicate.

Centralized management via a nicely crafted user interface offers easier admin for multiple devices. ShellHub provides a clever route to fixing a problem that's been around for a while. I hope you enjoy using it.

The Author

Chris Binnie's latest book, Linux Server Security: Hack and Defend, shows how hackers launch sophisticated attacks to compromise servers, steal data, and crack complex passwords, so you can learn how to defend against such attacks. In the book, Binnie also shows you how to make your servers invisible, perform penetration testing, and mitigate unwelcome attacks. You can find out more about DevOps, DevSecOps, Containers, and Linux security on his website:

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Tutorials – Docker

    You might think Docker is a tool reserved for gnarly sys admins, useful only to service companies that run complicated SaaS applications, but that is not true: Docker is useful for everybody.

  • Docker Open Source Developer Tools

    Docker provides the open source tools and resources for compiling, building, and testing containerized applications.

  • Docker

    Docker is an economical alternative to conventional virtualization. Because each Docker container shares the underlying operating system, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient.

  • Seafile 9

    Seafile offers file sharing and synchronization like Nextcloud and ownCloud, but its speed leaves the competition far behind.

  • Tube Archivist

    Tube Archivist indexes videos or entire channels from YouTube in order to download them with the help of the yt-dlp tool.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More