Skip to content

Secure SSH connectivty

Security
  • Hi all,

    I’m curious to understand how you all connect to your servers - hopefully, it’s at the very least using SSH and at the better end of the spectrum, using a key and passphrase combination. For those who are curious to understand why we need a key and passphrase, it’s because without it, your SSH session is still subject to brute force. In addition, you should NEVER allow root to login directly - either at the console physically (if you have a physical server within your reach), or via SSH session.

    In this case, you should be using a normal account to gain access via SSH, then elevating your session using

    su - or su root

    Permitting login as root directly is simply asking for trouble, and will effectively negate your security completely by allowing a complete stranger to bruteforce and then assume control of your server. You should also use a firewall to permit access to SSH via specified and approved IP addresses.

    This is security101 and an industry standard.

    Now it’s confession time on your part… 😄

    The other part of the bargain would be which SSH client you should use. There’s the go-to PUTTY for Windows, or even the command line (which has been greatly simplified in Windows 10/11). However, one I recently started using which is 100% free and extremely powerful is Bitvise

    Seriously, if you haven’t already got this application in your toolkit, then it’s time to add it.

  • undefined phenomlab marked this topic as a regular topic on 29 Nov 2022, 16:58
  • Hi all,

    I’m curious to understand how you all connect to your servers - hopefully, it’s at the very least using SSH and at the better end of the spectrum, using a key and passphrase combination. For those who are curious to understand why we need a key and passphrase, it’s because without it, your SSH session is still subject to brute force. In addition, you should NEVER allow root to login directly - either at the console physically (if you have a physical server within your reach), or via SSH session.

    In this case, you should be using a normal account to gain access via SSH, then elevating your session using

    su - or su root

    Permitting login as root directly is simply asking for trouble, and will effectively negate your security completely by allowing a complete stranger to bruteforce and then assume control of your server. You should also use a firewall to permit access to SSH via specified and approved IP addresses.

    This is security101 and an industry standard.

    Now it’s confession time on your part… 😄

    The other part of the bargain would be which SSH client you should use. There’s the go-to PUTTY for Windows, or even the command line (which has been greatly simplified in Windows 10/11). However, one I recently started using which is 100% free and extremely powerful is Bitvise

    https://www.bitvise.com/

    Seriously, if you haven’t already got this application in your toolkit, then it’s time to add it.

    And, if you want to confess that you’re not using SSH keys, then this is a great guide to change all that, and to take the necessary steps in securing your server…

  • And, if you want to confess that you’re not using SSH keys, then this is a great guide to change all that, and to take the necessary steps in securing your server…

    https://linuxhint.com/generate-ssh-key-ubuntu/

    @phenomlab

    Change SSH port is good too

    I use Tabby on Windows, very very good product

    I search a tutorial for use SSH keys with virtualmin but Ithink it’s not obliged to desactivate root login if you have sh key no ?

    I use crowdsec for bruteforce ssh attack (and other)

  • @phenomlab

    Change SSH port is good too

    I use Tabby on Windows, very very good product

    https://tabby.sh

    I search a tutorial for use SSH keys with virtualmin but Ithink it’s not obliged to desactivate root login if you have sh key no ?

    I use crowdsec for bruteforce ssh attack (and other)

    https://www.crowdsec.net

    @DownPW thanks for the update 👍

  • @phenomlab

    Change SSH port is good too

    I use Tabby on Windows, very very good product

    https://tabby.sh

    I search a tutorial for use SSH keys with virtualmin but Ithink it’s not obliged to desactivate root login if you have sh key no ?

    I use crowdsec for bruteforce ssh attack (and other)

    https://www.crowdsec.net

    @DownPW said in Secure SSH connectivty:

    Change SSH port is good too

    Yes, agreed, but easily revealed by a port scanner, and more obfuscation than actual security. Changing the default 22 is of course good security practice but won’t stop a determined attacker.

    @DownPW said in Secure SSH connectivty:

    I use Tabby on Windows, very very good product

    Not tried this, but will definitely take a look

    @DownPW said in Secure SSH connectivty:

    I search a tutorial for use SSH keys with virtualmin but I think it’s not obliged to desactivate root login if you have sh key no ?

    Again, this is more about your attitude to security. It’s a good point, but my preference is to not permit direct root access at all.

    @DownPW said in Secure SSH connectivty:

    I use crowdsec for bruteforce ssh attack (and other)

    Yes, I’m looking at this also.

  • @DownPW said in Secure SSH connectivty:

    Change SSH port is good too

    Yes, agreed, but easily revealed by a port scanner, and more obfuscation than actual security. Changing the default 22 is of course good security practice but won’t stop a determined attacker.

    @DownPW said in Secure SSH connectivty:

    I use Tabby on Windows, very very good product

    Not tried this, but will definitely take a look

    @DownPW said in Secure SSH connectivty:

    I search a tutorial for use SSH keys with virtualmin but I think it’s not obliged to desactivate root login if you have sh key no ?

    Again, this is more about your attitude to security. It’s a good point, but my preference is to not permit direct root access at all.

    @DownPW said in Secure SSH connectivty:

    I use crowdsec for bruteforce ssh attack (and other)

    Yes, I’m looking at this also.

    @phenomlab said in Secure SSH connectivty:

    I use Tabby on Windows, very very good product

    Seems this product is ALPHA ?
    f64b1ad2-281b-45d6-8c65-f4200d8f4cd5-image.png

  • @phenomlab said in Secure SSH connectivty:

    I use Tabby on Windows, very very good product

    Seems this product is ALPHA ?
    f64b1ad2-281b-45d6-8c65-f4200d8f4cd5-image.png

    @phenomlab

    yep but I use it since several month and I haven’t see any bugs or crash
    In any case, I only use him anymore 🙂

    Tabby offers tabs and a panel system, but also themes, plugins and color palettes to allow you to push the experience to the limit. It can support different shells in the same window, offers completion, has an encrypted container for your passwords, SSH keys and other secrets, and can handle different connection profiles.

    Each tab is persistent (you can restore them if you close one by mistake) and has a notification system, which will let you know if, for example, a process is finished while you are tapping in another tab.

    It’s really a great terminal that will easily replace cmd.exe for Windowsians or your usual terminal. And it can even work in a portable version for those who like to carry their tools on a USB key.

    –> To test it, you can download it, but there is also a web version. Handy for getting an idea.

  • mventuresundefined mventures referenced this topic on 5 Apr 2023, 00:13


1/7

29 Nov 2022, 16:58


Threaded Replies

Related Topics
  • 1 Votes
    1 Posts
    206 Views
    No one has replied
  • 0 Votes
    4 Posts
    832 Views
    @DownPW most of this really depends on your desired security model. In all cases with firewalls, less is always more, although it’s never as clear cut as that, and there are always bespoke ports you’ll need to open periodically. Heztner’s DDoS protection is superior, and I know they have invested a lot of time, effort, and money into making it extremely effective. However, if you consider that the largest ever DDoS attack hit Cloudflare at 71m rps (and they were able to deflect it), and each attack can last anywhere between 8-24 hours which really depends on how determined the attacker(s) is/are, you can never be fully prepared - nor can you trace it’s true origin. DDoS attacks by their nature (Distributed Denial of Service) are conducted by large numbers of devices whom have become part of a “bot army” - and in most cases, the owners of these devices are blissfully unaware that they have been attacked and are under command and control from a nefarious resource. Given that the attacks originate from multiple sources, this allows the real attacker to observe from a distance whilst concealing their own identity and origin in the process. If you consider the desired effect of DDoS, it is not an attempt to access ports that are typically closed, but to flood (and eventually overwhelm) the target (such as a website) with millions of requests per second in an attempt to force it offline. Victims of DDoS attacks are often financial services for example, with either extortion or financial gain being the primary objective - in other words, pay for the originator to stop the attack. It’s even possible to get DDoS as a service these days - with a credit card, a few clicks of a mouse and a target IP, you can have your own proxy campaign running in minutes which typically involves “booters” or “stressers” - see below for more https://heimdalsecurity.com/blog/ddos-as-a-service-attacks-what-are-they-and-how-do-they-work @DownPW said in Setting for high load and prevent DDoS (sysctl, iptables, crowdsec or other): in short if you have any advice to give to secure the best. It’s not just about DDos or firewalls. There are a number of vulnerabilities on all systems that if not patched, will expose that same system to exploit. One of my favourite online testers which does a lot more than most basic ones is below https://www.immuniweb.com/websec/ I’d start with the findings reported here and use that to branch outwards.
  • 4 Votes
    3 Posts
    1k Views
    @phenomlab No they have a free and pro console instance. We can see alert with IP, Source AS, scenario attack etc… Installation on the NODEBB server without problems. Very good tools [image: 1668812242411-cf7e5a89-84f4-435b-82eb-434c0bfc895e-image.png] [image: 1668811810555-cc82a10e-a1f1-4fd8-a433-7c9b2d31f254-image.png] [image: 1668811841819-1b7147b0-37c6-4d87-b4f1-a0fe92e74afd-image.png] [image: 1668811924623-7c21fc10-1825-48e1-a993-92b84455f074-image.png] – We can also do research on IPs via the crowdsec analyzer I believe it’s 500 per month in the Free version [image: 1668812069082-43bc8265-a57c-4439-829c-0bb8602d99b4-image.png]
  • 0 Votes
    1 Posts
    289 Views
    No one has replied
  • 0 Votes
    1 Posts
    295 Views
    No one has replied
  • 1 Votes
    1 Posts
    547 Views
    No one has replied
  • 3 Votes
    3 Posts
    553 Views
    @phenomlab said in is my DMARC configured correctly?: you’ll get one from every domain that receives email from yours. Today I have received another mail from outlook DMARC, i was referring to your reply again and found it very helpful/informative. thanks again. I wish sudonix 100 more great years ahead!
  • 2 Votes
    12 Posts
    1k Views
    And if you ever needed another reason to use a VPN, here it is. https://news.sky.com/story/google-blinks-first-in-11-month-privacy-showdown-with-uk-regulator-12479198