Two-Factor Authentication for SSH Login on Linux Logo

Two-Factor Authentication for SSH Login on Linux

0
Free
Visit Website

This tutorial describes how to set up two-factor authentication for an SSH server by integrating Google Authenticator with OpenSSH. Install Google Authenticator on Linux The first step is to install Google Authenticator on your Linux host. You can do this by running the following command: sudo apt-get install google-authenticator Configure Google Authenticator Once installed, you can configure Google Authenticator by running the following command: google-authenticator You will be prompted to enter a secret key. Make a note of this key, as you will need it later. Configure OpenSSH To configure OpenSSH to use Google Authenticator, you need to create a new file in the /etc/pam.d directory. You can do this by running the following command: sudo nano /etc/pam.d/sshd Add the following lines to the end of the file: auth required pam_google_authenticator.so Save and close the file. Then, restart the SSH server by running the following command: sudo service ssh restart Use Google Authenticator To use Google Authenticator, you will need to generate a one-time passcode on your Android device. You can do this by opening the Google Authenticator app and scanning the QR code that was generated during the configuration process. Enter the one-time passcode on your Linux host, and you will be logged in to your SSH server. Summary: This tutorial describes how to set up two-factor authentication for an SSH server by integrating Google Authenticator with OpenSSH.

FEATURES

ALTERNATIVES

Domain availability checker with privacy settings

A system for reserving classrooms at the University of Pisa.

Utility that exposes TLS certificate expiry as Prometheus metrics.

PLC-side fuzzing tool for uncovering vulnerabilities in ICS control applications.

A lab designed for defenders to quickly build a Windows domain pre-loaded with security tooling and best practices in system logging configurations.

A company that helps organizations create security-aware teams and produce bug-free software.

A security framework for process isolation and sandboxing based on capability-based security principles.

Utilize the kernel's CSPRNG for generating crypto keys instead of userspace CSPRNGs to avoid randomness failures.

PINNED

ImmuniWeb® Discovery Logo

ImmuniWeb® Discovery

ImmuniWeb Discovery is an attack surface management platform that continuously monitors an organization's external digital assets for security vulnerabilities, misconfigurations, and threats across domains, applications, cloud resources, and the dark web.

Attack Surface Management
InfoSecHired Logo

InfoSecHired

An AI-powered career platform that automates the creation of cybersecurity job application materials and provides company-specific insights for job seekers.

Resources
Mandos Brief Newsletter Logo

Mandos Brief Newsletter

A weekly newsletter providing cybersecurity leadership insights, industry updates, and strategic guidance for security professionals advancing to management positions.

Resources
Checkmarx SCA Logo

Checkmarx SCA

A software composition analysis tool that identifies vulnerabilities, malicious code, and license risks in open source dependencies throughout the software development lifecycle.

Application Security
Check Point CloudGuard WAF Logo

Check Point CloudGuard WAF

A cloud-native web application and API security solution that uses contextual AI to protect against known and zero-day threats without signature-based detection.

Application Security
Orca Security Logo

Orca Security

A cloud-native application protection platform that provides agentless security monitoring, vulnerability management, and compliance capabilities across multi-cloud environments.

Cloud Security
DryRun Logo

DryRun

A GitHub application that performs automated security code reviews by analyzing contextual security aspects of code changes during pull requests.

Application Security
Wiz Logo

Wiz

Wiz Cloud Security Platform is a cloud-native security platform that enables security, dev, and devops to work together in a self-service model, detecting and preventing cloud security threats in real-time.

Cloud Security