Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
Are you initiating SSH connections from all these hosts?
If you just need to SSH to these hosts, use a single key and copy the public key only to the hosts you need to connect to. If you don't want to copy the pubkeys to target hosts, use LDAP + SSSD or certificates.
Then, if you do need to initiate connections from these hosts and use an SSH agent you can forward your agent and SSH to another host
Have an alias so trusted hosts can bounce through my authorization host and end up on a tmux session on the targetted host. It has logging and such but mostly it's for simplicity.
If I plan to use that connection a lot there's a script to cat my priv key through the relay.
Have an scp alias too, but that gets more complicated.
For more sensitive systems I have 2fa from gauth set up, works great.
This is a common pattern, typically called a "jump host" or "bastion host".
When it comes to security, I typically recommend against rolling your own. SSH already has agent forwarding option to do this securely and the -J option to accomplish the same without even needing to forward the key. The agent can seem complex at first, it's actually pretty simple and worth learning.
Feel free to message me if you have more questions, I've got lots of experience w/ SSH.
I did not know -J, I rolled my own because I've been doing it forever and many of my tricks (non-ssh included) aren't as easily portable across different os's.
For some reason ssh-copy-id has been failing for me sometimes lately because it can't reach the agent, while cat always works, but I never learned much about the user agent, let me look into that now, thanks for the tip!
I think -J is newer and may not work if you have distro versions older than like 5 years (eg. Centos 7 or before). There is a less convenient syntax that does the same thing though
$ ssh -o ProxyCommand="ssh -W %h:%p bastion-host" remote-hostSee: https://www.redhat.com/sysadmin/ssh-proxy-bastion-proxyjump