Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've allowed SSH through my firewall and nothing else. I'm also running SUSE 10. I was just wondering, how hard would it be for a remote user to crack SSH? I was debating blocking SSH as well.
And also, do I really need SSH and SMTP (postfix) for any thing? If not then I'll just turn those services off.
But my initial question for this thread is, how hard is it to crack SSH? I have no interest in cracking people's computers but I would be interested in learning how, for strictly educational purposes.
If you have accounts with common usernames and weak passwords, then it is easy to gain access by guessing. If you have strong passwords, it is very difficult to guess the password by brute force. I suggest you disallow root login via SSH, since root is often attacked, and root access can be otherwise gained after login to another account. For more security, you can disable password logins and instead use public keys (much more secure) to login from trusted computers.
From what I have understood SSH is as secure as the weakest user-password combination that is allowed to connect to the system. The SSH server itself should be more or less impossible to crack.
If you don't plan to access (or let anybody else for that matter) your system remotely you can shut down the SSH server.
(1) If you don't have a clearly-defined need for ssh or any other service, turn the service off until you do.
(2) Functionally, ssh is still "a shell", and if you allow anyone to connect to it and demand from them no more than a simple username/password (as is the default), it's just as good to them as if they were using rsh or had walked into your office wearing an invisibility cloak.
(3) If you intend to use ssh to allow yourself remote access to your machine, always set it up to use digital certificates as the primary means of authentication. The documentation is plentiful and it's easy to do. Now, in order to even attempt to connect, the user is required to possess a valid certificate... which should be password protected. Users who cannot present that "identification badge" are turned away, having been given no opportunity to enter a password of any sort.
(3a) Digital certificates, used in this way, do not cost money: you generate them and sign them yourself.
(4) No one realistically breaks into a cryptosystem by brute-forcing the key. They attack the key-management system... or the lack thereof. Notice that, while SSH encrypts the traffic that it sends, it (by default) allows anyone, anywhere to "have a try at a user/pass," and if they guess right it lets them right in! But, if you use digital certificates, the strong cryptography is used twice: not only to encrypt the traffic, as before, but to provide an impregnable and irrefutable form of user authentication.
I wrote a little script that will generate the key for you then upload the key to the server you want just hit enter twice when it ask for a password. Once that is done it will ask for the password only for the first time you log in and after that it should not ask for a password. You may find this useful:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.