Linux ssh_keygen 生成的密钥文件的文件名的格式

ssh_keygen 手册 https://man7.org/linux/man-pages/man1/ssh-keygen.1.html

ssh-keygen是一个用于创建SSH认证密钥对的工具。这些密钥对用于自动登录、单点登录和主机身份验证。在Linux上,密钥对默认存储在用户家目录的“.ssh”目录。

例如使用id_rsa密钥登录SSH: ssh -i id_rsa testuser@192.168.1.10

要生成新的密钥对,可以在命令行中直接运行ssh-keygen命令。默认情况下,它将提示输入密钥文件的名称和位置,以及选择加密算法和密钥大小。也可以使用参数直接指定。

-b 参数指定密钥位数
在这里插入图片描述

-m ,这个参数作用是指定密钥生成的密钥的格式
在这里插入图片描述

-t ,这个参数作用是指定要创建的密钥的类型
在这里插入图片描述

密钥文件名称
在这里插入图片描述

     ~/.ssh/id_dsa
     ~/.ssh/id_ecdsa
     ~/.ssh/id_ecdsa_sk
     ~/.ssh/id_ed25519
     ~/.ssh/id_ed25519_sk
     ~/.ssh/id_rsa
             Contains the DSA, ECDSA, authenticator-hosted ECDSA,
             Ed25519, authenticator-hosted Ed25519 or RSA authentication
             identity of the user.  This file should not be readable by
             anyone but the user.  It is possible to specify a
             passphrase when generating the key; that passphrase will be
             used to encrypt the private part of this file using 128-bit
             AES.  This file is not automatically accessed by ssh-keygen
             but it is offered as the default file for the private key.
             ssh(1) will read this file when a login attempt is made.

     ~/.ssh/id_dsa.pub
     ~/.ssh/id_ecdsa.pub
     ~/.ssh/id_ecdsa_sk.pub
     ~/.ssh/id_ed25519.pub
     ~/.ssh/id_ed25519_sk.pub
     ~/.ssh/id_rsa.pub
             Contains the DSA, ECDSA, authenticator-hosted ECDSA,
             Ed25519, authenticator-hosted Ed25519 or RSA public key for
             authentication.  The contents of this file should be added
             to ~/.ssh/authorized_keys on all machines where the user
             wishes to log in using public key authentication.  There is
             no need to keep the contents of this file secret.

     /etc/moduli
             Contains Diffie-Hellman groups used for DH-GEX.  The file
             format is described in moduli(5).
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值