PDA

View Full Version : A security function that request for something before sign in my linux server via SSH



Fli
11-10-2014, 08:50 AM
Hello, can You provide a security function that request for something (second level authentication) before sign in my server? I mean so its harder to get in..

i think it might be possible using Googles two factor authentication software for Linux: http://xmodulo.com/two-factor-authentication-ssh-login-linux.html

Or option be, setup SSH key access instead of password:
A) https://support.hostgator.com/articles/specialized-help/technical/ssh-keying-through-putty-on-windows-or-linux
B) http://www.ualberta.ca/CNS/RESEARCH/LinuxClusters/pka-putty.html

One can also edit /etc/ssh/sshd_config file
and change ones port number to something non-standard like "789", save and "service sshd restart" to apply changes

bocaratonsh
10-09-2015, 09:52 PM
What you can also set up for added security is to configure an account lockout policy on SSH so it would never be susceptible to brute force attacks. https://imagicon.info/cat/6-4/1.gif

imort
05-24-2016, 10:36 AM
Hello, can You provide a security fucntion that request for something (second level authentication) before sign in my server? I mean so its harder to get in..

Well, you can use 2-factor authorization with any implementation you like, Google Authenticator for example.
You also can use SSH lockout policy to block your account in suspicion of brute-force attack.

But my advice is to use fairly standard 'fail2ban' package, which will track SSH logins and ban IP for chosen amounts of time if login unsuccessful.
You can look how to install and configure it here (https://serversuit.com/community/technical-tips/view/step-by-step-guide-to-setting-up-fail2ban.html).