Follow

ssh practice 

The latest standard for remote access should NOT be a *public* ssh port. I don't care about what method of authentication is in place, or what obfuscation is available. Honestly ssh ports should be LAN-only and behind strict firewalls. If you want remote access, setup a modern point to point VPN which gives you the modern cryptographic security as a default, then ssh from within the VPN on the relevant LAN.

· Edited · · Tusky · 2 · 2 · 1

ssh practice 

@thufie hmm, why?
no like, seriously question.
publicly ssh confed with modern crypto + enforcing pubkey use has the one big advantage of not creating a "internal" network feeling with lowered security.
If your internal behind the vpn" network is secured as if it was the internet, with hostfirewall and propper segmentation, then why do the vpn in the first place?
so cut out the middle section and put them the ssh on the internet direclty

ssh practice 

@4censord @thufie
See: the cheese slice model. You want at least two peaces of software from two different vendors on two seperate machines guarding things like root access, in case one has a security critical bug.

ssh practice 

@ranja @thufie oh, i hadnt heard of that model before, i'll look into it

ssh practice 

@ranja @thufie though i am wondering at what point simplicity wins out over complexity (because it lowers the chance of missconfigurations and similar errors)

ssh practice 

@ranja @thufie oh, its basically defense in depth with some more visualisation

re: ssh practice 

@4censord @ranja yeah I'd agree with all this while also adding that preconfigured point to point VPNs with wireguard for example come with a secure configuration out of the box for LAN access, and I would expect configuration mistakes in ssh from most sysadmins (bad packaged defaults, changed incorrectly or incompletely). This is both defense in depth, reducing attack surface of open ports, and an attempt to minimize chances of human misconfiguration.

Also the benefit of both initially allowing access to, and then revoking access to all 'internal' (LAN infrastructure) at once by revoking an individual's VPN access.

I don't think I am alone in this, since I've seen more enterprise org products targeting this approach, by integrating an organization's auth system, and VPN infrastructure connecting to a shared bridged LAN for easier, more secure development or shared operations. Just look at enterprise software built on Wireguard for some examples of how far you can take this approach. I prefer things less tightly integrated for personal stuff of course, but there is a serious draw based on scaling secure access to shared infra as well.

re: ssh practice 

@thufie @ranja i think in the end it depends on scale and threat model.
(at work) for a bank customer of ours, we have like 3 layers (access to our internal VPN, access to their VPN for externals via ours, and then a PAM system based on teleport)
at a healthcare customer it's a bunch of jump hosts with ssh keys (and config management to i can just roll out a revocation to everything), and just SSO federation for web stuff

both of which passed their respective audits and security teams

ssh practice 

@4censord @thufie
In practice you have your network people that take care of segmentation, firewalls, VPNs, etc. and your server admins that do their own security with host level firewalls, fail2ban, 2fa, x509, etc. both teams should not trust each other’s security measures and treat the other one as unsafe.

ssh practice 

@4censord @thufie
Zero trust is a base principle in IT Infrastructure engineering. Because everything has bugs, they just surface at different times.

ssh practice 

@ranja @thufie hmm, at that size that sounds like it makes sense. I've only ever did stuff in small scales, were the difference between the network team and the server team are the hats the individual people wear at that time.
and at that scale, "we do it once but correctly" is usually better than "we did multiple things badly"

ssh practice 

@4censord @thufie
I did both, from small hobby systems to ISP grade critical infrastructure and yeah, there’s a difference in what you can reasonably do as well as in threat level.
I usually have at least one ssh port on a jumpserver exposed for my home stuff in case my janky vpn dies and it’s on a non standard port with fail2ban and an endlessh trap on port 22. But my home stuff also isn’t the main target of advanced adversaries.

ssh practice 

@thufie the only public ssh port should be an endlessh.

(And yes I’ve once set one up myself just to fall into that trap a year later when I had forgotten about it)

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.