Preface
After the home data center is set up, how to manage and maintain numerous devices and applications becomes a challenge. Generally speaking, in terms of specific management methods, they are divided into CLI (such as SSH; since SSH is the mainstream CLI management method, SSH will be used instead of CLI hereafter) and WEB. In terms of management approaches, they can be divided into centralized and decentralized.
The representative of the centralized approach is the bastion host solution (such as next-terminal). Add all devices and applications (SSH and WEB) that need to be managed to the asset list of the bastion host, and then you only need to log in to the bastion host with a valid username and password to manage all devices via WEB (if you are not used to WEB-based SSH, you can also use SSH tools to connect to devices through the bastion host), and all access operations can be traced back in the logs.
Decentralized means directly managing all devices from different terminals. Why do I propose a decentralized concept? First, the centralized approach is too formal after all, and there are many functions I don't need (such as auditing functions), plus adding assets and setting permissions is also a hassle. Second, although I use a MacBook as my main terminal, I also have a Mac mini and a desktop Win11. The effect I want to achieve is: no matter which terminal I sit in front of, I can directly manage all devices and services; if I am away from home, I can also use an iPad or iPhone to handle emergencies. Three problems need to be solved here: 1. SSH device data synchronization. 2. WEB management device data synchronization. 3. Virtual networking.
SSH device data synchronization
As more and more devices need SSH management (NAS, LXC, Linux virtual machines, cloud hosts, etc.), it is impossible to add a new device on all terminals every time, which would be exhausting. Therefore, when choosing an SSH client, you need the client to support the data synchronization function. Here we mainly introduce two SSH clients that support data synchronization.
Electerm
This is an open-source and free client. Its advantages are that it supports Linux, MAC, and Windows operating systems simultaneously, supports SFTP, and most importantly, can synchronize bookmarks (device connection information) to GitHub or Gitee (requiring some simple configuration), which meets the requirements of the decentralized approach. However, there are also disadvantages: first, the interface always feels unattractive; second, there is no client on iOS or iPad, which fails to meet my requirements for remote O&M when going out. Of course, if you don't have this requirement, Electerm is the best choice.
Termius
I call it the strongest SSH client, meeting all my requirements, with only one drawback: it is super expensive and completely unaffordable. However, you can take a detour: education editions, student packs, etc. You can use your ingenuity if you want these.
WEB management device data synchronization
This is very simple; the synchronization function of the Chrome browser (requires VPN/proxy) or Edge can meet this need.
Virtual networking
For virtual networking, the ideal state is to assign a special IP address to each device that needs to be managed. Any device with a special IP (NAS, Linux virtual machine, cloud host, Win, Mac, phone, and iPad) can directly access each other when connected to the Internet (no public IP is needed for the home broadband egress, and even with a public IP, no port mapping is required, though the mutual access speed and latency depend on the network operator; of course, you can also build your own relay server, which requires a public IP, either from home broadband with a public IP or by buying a cheap cloud host). The benefits of this are, first, remote desktop and other accesses do not need to go through a transit and can be directly accessed using the system's built-in tools (such as the Windows Remote Desktop client, and Microsoft Remote Desktop is also available on Mac) or good remote desktop access tools (such as Jump Desktop), which offers a significantly better experience than transit-based types; second, it can meet my goal of directly accessing all devices and applications using a phone or iPad when I am not at home (it is impossible to use public IP mapping, firstly because not everyone has a public IP, and secondly, even with a public IP, mapping so many ports is too risky). There are many such solutions, but it is recommended to choose one based on the WireGuard protocol (such as Tailscale), which offers more flexible connectivity. You can search for this yourself; I won't say too much as it is a bit sensitive.
For more applications of virtual networking, please refer to:Home Data Center Series: The Application of Virtual Networking Technology。
Others
Of course, besides SSH and WEB, there are other client types. For example, database O&M requires a dedicated client: phpMyAdmin (usable, but the experience is not good) or DBeaver (free and easy to use). In addition, it is also recommended to set up a Windows virtual machine as a dedicated machine for remote desktop O&M, and friends with a public IP can set up a public port mapping, mainly to solve the problem of needing to handle complex issues when not at home (after all, iPhone and iPad screens are small; they are fine for emergency handling, but more complex tasks, like writing blogs, are still best handled on a computer. At this time, you can just find any internet cafe and remote desktop to the Windows O&M dedicated machine).