logo
  • 教程列表
  • SO官方文档
  • 安全外壳(SSH)
    • 连接到远程服务器
    • 安装 OpenSSH 套件
    • 生成公钥和私钥
    • 配置 SSH 服务器以接受连接
    • 无密码连接(使用密钥对)
    • 禁用 ssh 服务
  1. StackOverflow 文档
  2. GNU/Linux 教程
  3. 安全外壳(SSH)
  4. 生成公钥和私钥

生成公钥和私钥

Created: November-22, 2018

要为 SSH 客户端生成密钥:

ssh-keygen [-t rsa | rsa1 | dsa ] [-C <comment>] [-b bits]

例如:

ssh-keygen -t rsa -b 4096 - C myemail@email.com

私有的~/.ssh/id_rsa 和公钥的~/.ssh/id_rsa.pub 默认位置。

有关详细信息,请访问 man.openbsd.org

  • 配置 SSH 服务器以接受连接
  • 安装 OpenSSH 套件

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明