Wednesday, July 1, 2015

Converting ppk key to a format that can be used with ssh. ( useful for Automating repeated tasks )

Often times you encounter a situation where you have a certain ppk file for a certain user, and want to automate logging into a server repeatedly using ssh and
doing it command line is so much simpler ,than using the putty interface .

The ppk file cannot be used in a ssh command line.
The ppk can only be used in the Putty terminal in the Auth panel.


This does not help if you want to repeatedly login to different servers command line in linux.

So this is what needs to be done.

1. Take the ppk file and convert it to a format that ssh will recognize.
Use command : puttygen user.ppk -O private-openssh -o key.ssh


2. ssh   user@10.xx.xx.xx  -i key.ssh

will let you login directly to the remote server.