You are only browsing one thread in the discussion! All comments are available on the post page.

Return

starkzarn ,

That all sounds correct to me. The random port you’re seeing in the logs is a high port, often referred to as an ephemeral port, and it is common for source ports. All good there.

cyberwolfie OP ,

Ok, thanks - so if I understand correctly then, it is listening on port 22 as a default, and not accepting traffic on any port.

That brings of the question: wouldn’t I be better off changing the SSH-port? And is that so easy as to uncomment the #Port 22 line in the config file and changing the port number to something random, and saving that somewhere? Would I then be able to connect by running ssh [email protected]:, or would I need to do anything else to successfully connect?

siph ,

You would need to specify the new port when using ssh (using the -p$PORT option). Just keep in mind that security through obscurity is not considered secure in itself. You could instead consider a service like fail2ban that automatically blocks connections from certain sources depending on your set parameters.

cyberwolfie OP ,

Just keep in mind that security through obscurity is not considered secure in itself.

Do you consider it to not be a helpful measure to take at all?

I have fail2ban configured - since it is reading from the auth.log, I guess I would not have to make any changes to the configuration there to have it work with a new port?

siph ,

It’s a mixed bag. Personally I wouldn’t use a non-standard port.

Consider that port numbers under 1024 are Privileged Ports. You would either have to make sure that no other privileged service is running on the port you want to use for SSH when using another privileged port or you need to make sure that no unprivileged program tries to use the same port as your SSH service when using a non-privileged. Overall it adds a bit of overhead and possible headaches for barely any gain.

Fail2ban should work with a different port without any further configuration but it might not.

cyberwolfie OP ,

Alright, cheers - I’ll leave it be as well then :)

Tanoh ,

You would need to specify the new port when using ssh (using the -p$PORT option).

You can put a host entry for it in .ssh/config specifying the port.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • wartaberita
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • TheResearchGuardian
  • SuperSentai
  • feritale
  • oklahoma
  • Testmaggi
  • KbinCafe
  • Ask_kbincafe
  • KamenRider
  • All magazines