SSH
Secure Shell (SSH) is a cryptographic network protocol for secure remote login, command execution, and file transfers. It is an indispensable tool for Linux, cloud computing, DevOps, and server administration, ensuring encrypted communication over unsecured networks.
See also: SSH Fundamentals: Secure Remote Access and Encryption Explained
Installation
- Windows: Install OpenSSH server via PowerShell (Admin):
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 - Linux:
sudo apt install openssh-server(Debian/Ubuntu)
Configuration
- Windows (WSL):
- Administrator accounts: All keys must go to:
C:\ProgramData\ssh\administrators_authorized_keys(Windows OpenSSH ignores.ssh\authorized_keysfor admin accounts) - Non-admin accounts: Use
C:\Users\<user>\.ssh\authorized_keys
- Administrator accounts: All keys must go to:
- Linux: Keys go to
~/.ssh/authorized_keys
Key Management
- Generate keys:
ssh-keygen -t ed25519 - Distribute public keys to
authorized_keysfiles on target servers - Always use key-based authentication instead of passwords
Security
- Disable root login (
PermitRootLogin noinsshd_config) - Ensure all data transmitted is encrypted to prevent interception