需要在centos7中使用putty将ppk文件转换为pem文件以将文件传输到亚马逊

时间:2016-06-10 12:11:59

标签: amazon-web-services amazon-ec2 centos putty centos7

有一个ppk密钥登录亚马逊机器。但是要从linux机器登录,必须将其转换为pem文件,因为我在以下链接中阅读。

http://sarathlal.com/convert-ppk-file-to-pem-file-connect-to-remote-server-via-ssh-linux/

http://webkul.com/blog/convert-a-ppk-file-to-a-pem-file/

但无法在centos7中找到/安装putty。

[dkanagaraj@localhost ~]$ sudo yum install puttygen
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosv.centos.org
 * extras: centosk3.centos.org
 * updates: centosv.centos.org
No package puttygen available.
Error: Nothing to do

[dkanagaraj@localhost ~]$ sudo yum install putty
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosv.centos.org
 * extras: centosk3.centos.org
 * updates: centosv.centos.org
No package putty available.
Error: Nothing to do

[dkanagaraj@localhost ~]$ sudo yum install putty-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosv.centos.org
 * extras: centosk3.centos.org
 * updates: centosv.centos.org
No package putty-tools available.
Error: Nothing to do

[dkanagaraj@localhost ~]$ sudo yum whatprovides putty
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosv.centos.org
 * extras: centosk3.centos.org
 * updates: centosv.centos.org
No matches found

[dkanagaraj@localhost ~]$ sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosv.centos.org
 * epel: mirror.pregi.net
 * extras: centosk3.centos.org
 * updates: centosv.centos.org
repo id                                                                              repo name                                                                                                           status
base/7/x86_64                                                                        CentOS-7 - Base                                                                                                      9,007
epel/x86_64                                                                          Extra Packages for Enterprise Linux 7 - x86_64                                                                      10,122
extras/7/x86_64                                                                      CentOS-7 - Extras                                                                                                      310
updates/7/x86_64                                                                     CentOS-7 - Updates                                                                                                   1,687
repolist: 21,126

真的很感激,如果有其他方法可用。

3 个答案:

答案 0 :(得分:3)

已登记的步骤适用于我的CentOS 7系统:

[下载并安装EPEL资源库]

sudo wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
sudo rpm -ivh epel-release-7-11.noarch.rpm

[安装putty]

sudo yum install putty

答案 1 :(得分:0)

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
sudo rpm -ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
sudo yum --enablerepo=rpmforge install putty
puttygen SISPKey.ppk -O private-openssh -o pemkey.pem
cd .ssh
cp pemkey.pem ~/.ssh/
chmod 400 .ssh/pemkey.pem

答案 2 :(得分:0)

rpmforge 目前似乎无法使用。入伍的步骤适用于我的CentOS 7系统:

  1. 下载并安装EPEL资源库: sudo wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm sudo rpm -ivh epel-release-7-10.noarch.rpm

  2. 安装putty: sudo yum install putty