Chinaunix首页 | 论坛 | 博客
  • 博客访问: 397405
  • 博文数量: 119
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 1061
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-14 12:48
个人简介

醉心于技术。

文章分类

全部博文(119)

文章存档

2018年(34)

2016年(1)

2015年(4)

2014年(6)

2013年(74)

我的朋友

分类: 系统运维

2013-09-06 22:29:22

一,从PuTTyGen生成的private key转换成OpenSSH key-gen的key。

1. 打开PuttyGen软件

2. 点击load按钮。导入puttygen的private key。输入passphrase。

3. 点击Conversions下拉菜单,选中Export OpenSSH key。输入要保存的文件名,例如id_rsa。

4. 用notepad++或者其他便捷编辑工具打开保存的OpenSSH key文件。拷贝内容到Linux的~/.ssh/下,并保存为id_rsa。

5. 更改id_rsa的权限为600。chmod 600 ~/.ssh/id_rsa。

6. 现在就可以用这个OpenSSH的private keygen登陆了。而且不需要选择文件路径。ssh会自动寻找并应用。

7. 如何避免输入passphrace?

二, 从OpenSSH key-gen生成的key转换成PUTTYgen的private key。
-------------------------------------------------------------------------------------------------------------------------



三,如何临时禁止openssh验证id_rsa?
    使用IdentityFile=none参数。

  1. ssh -o IdentityFile=none -l username hostname


资料:

puttygen supports exporting to an OpenSSH compatible format.

  1. Open PuttyGen
  2. Click Load
  3. Load your private key
  4. Go to Conversions->Export OpenSSH and export your private key
  5. Copy your private key to ~/.ssh/id_dsa (or id_rsa).
  6. Create the RFC 4716 version of the public key using ssh-keygen

    ssh-keygen -e -f ~/.ssh/id_dsa > ~/.ssh/id_dsa_com.pub

  7. Convert the RFC 4716 version of the public key to the OpenSSH format:

    ssh-keygen -i -f ~/.ssh/id_dsa_com.pub > ~/.ssh/id_dsa.pub


阅读(13723) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~