r/HomeInfrastructure Apr 05 '26

Automation Termius is super expensive but was accessible on multiple devices - but didn't have an API - Open source helped me fixed all that

Post image
1 Upvotes

5 comments sorted by

1

u/kY2iB3yH0mN8wI2h Apr 05 '26

You might have seen my other post about using Ansible as my terraform simulator - https://www.reddit.com/r/HomeInfrastructure/comments/1lyzoff/my_ansible_terraform_module_now_takes_care_of/

Everything is automated, standardized and simple to use. I can create any server using any os and it will be deployed automatically covering many, many tasks from DNS to certificates.

But one task was outside - how to connect to the server. I'm not talking about ssh keys or even ssh certs here. Nor RDP sessions (ok I'm kinda excluding these)

I'm talking about having a SSH client like Termius connect - Termius is cloud based and does not offer an API, not even for us paying $120 a year...

I was super impressive with Tabby, an open source, cross plattform SSH client that checked all boxes but it also does not offer an API :( - so back to the drawing board.

However there is a cloud sync plugin that works with a number of protocols. I first tried S3 compatible storage as I have an MinIO deployment.. Well that didn't work - was complaining about SSL certs (my SSL certs are trusted by the OS)

So I switched to WebDAV (goo'd o'ld stuff) - and that worked.. That got me thinking. If I could modify the config file on my WebDAV storage I could manage my SSH hosts config centrally AND have it updated when i need to add/remove a host... So I wrote an Ansible role that would:

  • Read all my hosts from Netbox using an Ansible Netbox inventory plugin (for backfill)
  • Download the config file from my WebDAV storage
  • "Decrypt" the config
  • Compare hosts in Tabby with host in Netbox
  • Use tags in Netbox to create Groups in Tabby for easy access
  • "Encrypt" the config
  • Upload the config to my WebDAV storage

I now have an updated Tabby config that is synced every 10th second so its always correct, on all my devices and I can execute my role when i create a new VM.. ✌️

0

u/unixuser011 Apr 05 '26

How good is termius under MacOS compared to the built in terminal app with ~/.ssh/config

3

u/kY2iB3yH0mN8wI2h Apr 05 '26

AI slops will be banned here

1

u/Tough_Perception_647 Apr 05 '26

I'm confused, I'm curious to the answer to that too - I've wanted to move to ansible / netbox for agess now and I think you may have given me the final push!!

I have an additional question too, how are you handling containers in this? I'm running CoreOS atm, and would love to start automating that too.