Post B12bfeGf2ezWaETb1s by aesthr@wandering.shop
 (DIR) More posts by aesthr@wandering.shop
 (DIR) Post #B12bfax3N6WaIYHOYC by aesthr@wandering.shop
       0 likes, 0 repeats
       
       Set up your SSH (keys, usernames, ports) so that you can go to every host you need to with just `ssh <hostname>`.It’s so nice.Too long have I bothered with typing out “ssh -p 9999 whoever@whatever.com” constantly.
       
 (DIR) Post #B12bfc2PKgOxfRnBXE by aesthr@wandering.shop
       0 likes, 0 repeats
       
       My setup is that I mostly have the same username on every machine, keys instead of passwords, and default port 22 (it’s fine, calm down).And whenever that is not possible, ssh_config can cover the exceptions like setting a port of username for a specific host, and aliasing ling hostnames to shorter ones.
       
 (DIR) Post #B12bfcg6x4A1eaMtQ8 by aesthr@wandering.shop
       0 likes, 0 repeats
       
       About the default port 22: i know some people insist on changing it for “security”.Except it doesn’t really add any security when you already use keys and disallow password login over ssh. It’s just a very thin layer of obscurity.And if you worry about bits spamming your SSHD with login attempts, install fail2ban. Problem solved. And on non-public machines this really doesn’t matter anyway.
       
 (DIR) Post #B12bfeGf2ezWaETb1s by aesthr@wandering.shop
       0 likes, 0 repeats
       
       The only reason for me to use a non-default ssh port is when 22 is already used for something else that’s ssh-based like a git server (Gitlab, Forgejo, …), because having the git-ssh URLs with custom ports is annoying.
       
 (DIR) Post #B12bffvor7VZkAjyoy by pitbuster@lile.cl
       0 likes, 0 repeats
       
       @aesthr you can still use the same port for regular ssh and for a git server in the same machine (basically you forward the ssh connection for the git user). I do that on my homelab :)