系统配置 ubuntudebiancentos beginner

生成 SSH 密钥对

生成 Ed25519 SSH 密钥对

概述

生成 Ed25519 SSH 密钥对

命令

ssh-keygen -t ed25519 -C "zshell@$(hostname)" -f ~/.ssh/id_ed25519 -N ""

适用场景

Git/GitHub 认证、SSH 免密登录、自动化部署。

前置条件

OpenSSH 已安装。

常见问题

  • 权限错误 → chmod 600 ~/.ssh/id_ed25519
  • 公钥上传 → ssh-copy-id user@host

相关命令

  • SSH 安全加固
  • rsync 增量备份

相关