windows,linux,mac生成ssh public key 和 private key
2016-05-23 23:31
1046 查看
https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair
If the instructions for your operating system are not here, get in touch to request them or, if you know what to do, add them to this page.
sudo apt-get install openssh-client
With Cygwin you can follow the instructions here: http://pigtail.net/LRP/printsrv/cygwin-ssh.html
Step 2: Once OpenSSH is installed, stay in the terminal and type:
ssh-keygen -t rsa
Step 3: When prompted, press Enter to accept the default file name for your key.
Step 4: Next, enter then confirm a password to protect your SSH key. Your key pair is stored in ~/.ssh/ as id_rsa.pub (public key) and id_rsa (private key)
Now you need to upload the public portion of your SSH key to Launchpad.
Possible Step 5: You may need to run ssh-add with the id file if you created an id file other than ~/.ssh/id_rsa. Do ssh-add /path/to/file/id_rsa_newfile . If you’re on the Mac, you can execute the following on the command line:
cat ~/.ssh/id_rsa.pub | pbcopy
Step 2: Run puttygen.exe and click the generate button. PuTTYGen will ask you to move your mouse around in the blank area to generate entropy.
Step 3: Set a key passphrase and confirm it.
Step 4: Click "Save public key" and choose a location to save it. Click "Save private key" and choose a secure location to save it. You must keep this secret key safe!
Creating the key
How you create your SSH key pair depends on which operating system you use.If the instructions for your operating system are not here, get in touch to request them or, if you know what to do, add them to this page.
Linux/Cygwin/MacOS
Step 1: Install OpenSSH. On Ubuntu, you can install OpenSSH by opening your terminal and typing:sudo apt-get install openssh-client
With Cygwin you can follow the instructions here: http://pigtail.net/LRP/printsrv/cygwin-ssh.html
Step 2: Once OpenSSH is installed, stay in the terminal and type:
ssh-keygen -t rsa
Step 3: When prompted, press Enter to accept the default file name for your key.
Step 4: Next, enter then confirm a password to protect your SSH key. Your key pair is stored in ~/.ssh/ as id_rsa.pub (public key) and id_rsa (private key)
Now you need to upload the public portion of your SSH key to Launchpad.
Possible Step 5: You may need to run ssh-add with the id file if you created an id file other than ~/.ssh/id_rsa. Do ssh-add /path/to/file/id_rsa_newfile . If you’re on the Mac, you can execute the following on the command line:
cat ~/.ssh/id_rsa.pub | pbcopy
Windows (PuTTY)
Step 1: Download the PuTTY Key Generator from here:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlStep 2: Run puttygen.exe and click the generate button. PuTTYGen will ask you to move your mouse around in the blank area to generate entropy.
Step 3: Set a key passphrase and confirm it.
Step 4: Click "Save public key" and choose a location to save it. Click "Save private key" and choose a secure location to save it. You must keep this secret key safe!
相关文章推荐
- 一只Linux小白,啊哈哈。。。以后就将自己的学习心得与大家分享啦!希望大家可以指出我的错误与不足之处
- Linux下的文件查找命令——find
- linux内核剖析
- Linux中常见的解压压缩文件命令
- Linux文件属性与用户组
- Linux下FastDFS图片服务器的搭建
- CentOS7安装MySQL5.7.11
- Linux(Ubuntu14.04)下安装Anaconda和Spyder
- Linux根文件系统构建---动态库
- PRO-1:Day1-linux基础
- ubantu下安装NVIDIA独立显卡驱动
- gdb调试
- CentOS 6.6永久关闭 SELinux与防火墙 的方法
- linux查看当前系统有几个账户
- Linux用户环境
- kali2.0源~~~摸着论坛学kali
- linux基本命令(31)——/etc/group文件详解
- linux命令之tail
- Linux 添加开机自启动
- linux命令之rpm