Files
nexus/wiki/concepts/SSH.md
2026-04-16 21:08:55 +08:00

915 B
Raw Blame History

title, type, tags, date
title type tags date
SSH concept
security
networking
remote-access
2026-04-16

Definition

SSHSecure Shell安全外壳是一种加密网络协议用于安全地远程登录计算机系统、执行命令和传输文件。

Key Properties

  • 默认端口22
  • 加密传输RSA、ECDSA、Ed25519 等算法)
  • 支持密码认证和公钥认证
  • 支持端口转发、隧道功能

Commands

ssh user@hostname              # 远程登录
scp file user@host:/path      # 安全复制
sftp user@host                # 安全文件传输
ssh-keygen -t ed25519        # 生成密钥

Security Best Practices

  • 禁用密码认证,使用密钥登录
  • 更改默认端口
  • 使用防火墙限制访问来源
  • 启用 Fail2Ban 防止暴力破解
  • 定期更新 SSH 版本

Connections