SSH Key pair的生成

If you want to create:

ED25519 SSH keys

The book Practical Cryptography With Go suggests that ED25519 keys are more secure and performant than RSA keys.

As OpenSSH 6.5 introduced ED25519 SSH keys in 2014, they should be available on any current operating system.

You can create and configure an ED25519 key with the following command:

ssh-keygen -t ed25519 -C "<comment>"

The -C flag, with a quoted comment such as an email address, is an optional way to label your SSH keys.

 

 

RSA SSH keys

If you use RSA keys for SSH, the US National Institute of Standards and Technology recommends that you use a key size of at least 2048 bits. By default, the ssh-keygen command creates an 1024-bit RSA key.

You can create and configure an RSA key with the following command, substituting if desired for the minimum recommended key size of 2048:

ssh-keygen -t rsa -b 2048 -C "email@example.com"

The -C flag, with a quoted comment such as an email address, is an optional way to label your SSH keys.

以.pub结尾的文件就是公钥

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值