SSH
Secure Shell (SSH) is a cryptographic network protocol for secure remote login, command execution, and file transfers.
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) - Use SSH key passphrases
- Restrict access via
AllowUsersinsshd_config
Backlink: 2026 04 14 Install SSH and configure to access WSL