this post was submitted on 28 Nov 2023
3 points (100.0% liked)

Self-Hosted Main

517 readers
1 users here now

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.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 2 years ago
MODERATORS
 

i want to remotely ssh to my home server, and I was wondering if I could just forward port 22 with disabling password login and use pubkey authentication will be safe enough?

you are viewing a single comment's thread
view the rest of the comments
[–] brandontaylor1@alien.top 3 points 1 year ago (5 children)

As long as password auth is disabled you’re fine. No one is cracking your RSA key. You can add Fail2Ban to reduce the log noise, but security wise it’s fine.

[–] boxcorsair@alien.top 2 points 1 year ago (1 children)
[–] SR_Lut3t1um@alien.top 1 points 1 year ago (1 children)

Dont connect it to the internet too. Chances are even less likely that some navy seals kinda guys will steal you data with brute force. Also always keep explosives next to your hdds so once they do come you can explode them.

Thats why I store thermite by my rack. Burns it all down.

[–] DarthNihilus@alien.top 1 points 1 year ago

Realistically no one is cracking my super long randomized password either. Seems fine to leave it on as backup login.

[–] mshriver2@alien.top 1 points 1 year ago

If you really want security you should also add UFW and restrict it to only your IP address.

[–] Beastmind@alien.top 1 points 1 year ago (1 children)

Also don't use rsa, use Ed25519 nowadays

[–] upofadown@alien.top 1 points 1 year ago (3 children)

RSA is fine. It isn't like you will have to worry about the length of the keys for SSH.

[–] GolemancerVekk@alien.top 1 points 1 year ago (1 children)
[–] upofadown@alien.top 1 points 1 year ago

Requires an actual hardware error. Almost all implementations, including all open source SSH implementations, check that the signature is valid thus preventing a cosmic ray induced bit flip from triggering this issue and any related issue.

What effect do hardware errors have on Ed25519?

[–] Beastmind@alien.top 1 points 1 year ago

It is but if you're going to use something security related, use the current recommendation unless you stricly can't for legacy reason or something.

[–] mr_whats_it_to_you@alien.top 1 points 1 year ago (1 children)

Well it‘s true that one can use RSA, which is still save with keys big enough, but if someone wants so save some extra computing power and time ed25519 is the way to go.

[–] dumbasPL@alien.top 1 points 1 year ago (1 children)

The difference is extremely tiny because asymmetric encryption is only used at the very beginning to securely establish a symmetric key that will be used for everything else afterwards. So you would have to be running this on a smart fridge to notice the speed difference.

[–] Hatta00@alien.top 1 points 1 year ago (1 children)

Change your port.

No one's cracking a proper implementation of RSA, but not every implementation is proper. A little obscurity can't hurt.

[–] pentesticals@alien.top 1 points 1 year ago (1 children)

Just waiting for everyone to come in saying you shouldn’t do this lol. Yes, changing the port is a nice little bonus. It doesn’t any extra security, but it moves you out of the way from the automated bots that scan the internet trying recent 0days. You’ll probably see a reduction of 99% traffic hitting the service and the only logs will be real people.

[–] Oujii@alien.top 1 points 1 year ago (2 children)

only logs will be real people.

There are bots that scan for open ports in minutes.

[–] pentesticals@alien.top 1 points 1 year ago

Yes but most bots are scanning for common ports. It’s far too slow to scan 65k ports on every host. Even things like shodan only scan a handful of common ports. But you can test this yourself, expose SSH on a port number in 20-40ks, I’ve seen several weeks without a single probe.

If you’ve ever done mass scanning you know that’s minutes is not going to to be a full scan and if you are trying to do 65k ports in a few minutes, your results will not be accurate.

[–] Karyo_Ten@alien.top 1 points 1 year ago (2 children)

But then it's blatantly obvious and you can behavior block.

[–] nefarious_bumpps@alien.top 1 points 1 year ago

Apparently, the downvoters don't understand IPS.

[–] dal8moc@alien.top 1 points 1 year ago (1 children)

Which is easily defeated by using one block of ip addresses to gather data and another block for actually trying to exploit found ports. Unless you block the whole AS. If the attacker only uses one system with one ip they probably wouldn’t have the resources to get past ssh anyway.

[–] Karyo_Ten@alien.top 1 points 1 year ago

Behavior blocking can be done across many IPs.

If you have one IP that scans port 10000, the other port 10001, and thousands of other IPs scanning just 1 port it's still blatantly obvious.

And if they want to scan in a less obvious manner they need to do this spaced by days.