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

    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.

  • Perl: Testing Modules with Docker

    If you want to distribute your programs across multiple platforms, you need to prepare them to run in foreign environments from the start. Linux container technology and the resource-conserving Docker project let you test your own Perl modules on several Linux distributions in one fell swoop.

  • Docker with OwnCloud

    Run your application smoothly and portably in the cloud with the Docker container system. This workshop takes a practical look deploying Docker with the OwnCloud cloud environment.

  • Monitoring Station

    With a monitoring system implemented in Go, Mike Schilli displays the Docker containers that have been launched and closed on his system.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95