PW0N's Blog

分享更多的技术让志同道合的一起学习交流

0%

Linux创建SSH秘钥

SSH 公钥创建

打开你的linux 输入

1
ssh-keygen -t rsa -C "[email protected]"

[email protected]”填写你自己的email 不要填写示例的

一路回车

1
2
3
4
5
6
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

切换到ssh目录

1
cd .ssh

用cat、 vim、 或者nano 把秘钥复制出来或者在下载到你的电脑上

1
cat id_rsa.pub

这样就会显示你的秘钥

懒的调格式了 就这样吧

Link
Plus
Share
Class
Send
Send
Pin