Logo

dev-resources.site

for different kinds of informations.

How I Secured Port 22

Published at
12/16/2024
Categories
ibbus
port22
ssh
protocol
Author
ibrahimsi
Categories
4 categories in total
ibbus
open
port22
open
ssh
open
protocol
open
Author
9 person written this
ibrahimsi
open
How I Secured Port 22

SSH is a protocol that allows us to communicate between two computers over the internet (share files, control, or modify remote computers). Its most notable applications are remote login and command-line execution.

Here is the step-by-step process:

  • Install Google Authenticator
  • Configure MFA in PAM
  • Update SSH Configuration
  • Test the setup by logging in again using SSH.

The first step was to install the PAM module for Google Authenticator, which enables Time-based One-Time Passwords (TOTP).
sudo apt update && sudo apt install libpam-google-authenticator
google-authenticator

This generated a QR code I scanned using my authenticator app (like Google Authenticator or Authy) to enable MFA.

The second step was to edit /etc/pam.d/sshd and add this line:
auth required pam_google_authenticator

The third step was to update the SSH configuration.
Edit /etc/ssh/sshd_config and set:
ChallengeResponseAuthentication yes
PasswordAuthentication no
AuthenticationMethods publickey,keyboard-interactive

Restart SSH:
sudo systemctl restart ssh

SSH clients and SSH servers are available for most network operating systems." When you first get acquainted with it, it is most likely presented as a means for accessing a remote server. First of all, that's how it is. However, its capabilities are much wider.

protocol Article's
30 articles in total
Favicon
How I Secured Port 22
Favicon
Reflector Oracle Protocol Documentation Improvement Suggestions
Favicon
A High-Level Overview of Reflector Oracle Protocol
Favicon
A Comprehensive Guide to Integrating Reflector Oracles into Your App or Smart Contracts
Favicon
How EDI Communication Protocols Streamline Business Data Exchange
Favicon
FMZ Quant Trading Platform Custom Protocol Access Guide
Favicon
Understanding Beckn Protocol: Revolutionizing Open Networks in E-commerce
Favicon
The backbone of the internet: understanding protocol
Favicon
Exploring FMZ: Practice of Communication Protocol Between Live Trading Strategies
Favicon
Peer-to-peer (P2P) protocol
Favicon
need suggestions
Favicon
use formal Python protocol
Favicon
Exploring FTP and SSL/TLS Protocols in Networking: A Comprehensive Guide
Favicon
Behind the scenes with FTP
Favicon
Choosing the Right Streaming Protocol for AWS Elemental MediaConnect
Favicon
Some important UART (Universal Asynchronous Receiver-Transmitter) Interview Questions sets with answers
Favicon
Hyperdust Protocol Multi-chain Version Launching Soon
Favicon
Bidirectional Forwarding Detection (BFD) in Network Environments
Favicon
An Introduction to Border Gateway Protocol (BGP)
Favicon
Understanding Generic Routing Encapsulation (GRE)
Favicon
Understanding IPsec and MACsec - Securing Network Communication
Favicon
Will Google's QUIC Protocol Replace TCP?
Favicon
Reclaiming Our Digital Space: The Rise of NOSTR and the Renaissance of Social Media πŸ’ͺ🏻
Favicon
Top 8 API Protocols: Understanding the Most Popular Choices
Favicon
January 1, 1983: The Day the Internet Came Alive with TCP/IP
Favicon
Network protocol
Favicon
Implementing Video Streaming Protocols in OTT Apps
Favicon
Introdução ao SSH
Favicon
Wesh: Flight of a Byte
Favicon
Wesh App: Share Contact and Send Message

Featured ones: