Search code examples
amazon-web-servicesamazon-ec2centosputtycentos7

Need putty in centos7 to convert ppk file to pem file to transfer files to amazon


Have a ppk key to login into amazon machine. But to login from linux machine it has to be converted into pem file as i read in the following links.

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/

But unable to find / install putty in centos7.

[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

Really appreciated if any other method is available.


Solution

  • 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