Putty is probably the most common tool to access Unix/Linux environments on Windows platform by using ssh protocol.

Recently I’ve been in situation where I’ve got only Putty generated ppk file to access Unix server.

Although I’ve asked if I can get open ssh generated file, that was not possible, as it was assumed that all IT consultants are working on Windows machines.

Since I was the only who had different OS, I had to find a way how to access Unix server by using Putty generated ppk private key file.

The most obvious way is to install Putty on Linux, but until then I didn’t see a reason why someone would port Putty on Linux, as Linux is already packed with many excellent terminal tools.

To my surprise, Putty on Linux is only one command away from being  installed.

On Ubuntu & derivates you need to execute:

sudo apt-get install putty-tools

while on Red Hat clones (CentOS, Oracle Linux, Fedora) the same command is:

yum install putty

First problem solved, now the second issue.

 

Putty on Linux, as I’ve found out later, is not only limited with available options compared to the widows version, but has one annoying problem.

If I manually enter password in Putty terminal, I can establish connection normally, but copy/paste method doesn’t work properly.

There are many links on the web suggesting to try with some key combinations like Shift+Ins  or Ctrl+Shift+v, or to click with a mouse wheel or mouse middle button.

Unfortunately, all solutions have failed in my case, or at least didn’t work reliably.

After a while I’ve concluded that the only way to overcome issues with Putty on Unix/Linux/MacOS is to avoid using Putty at all.

Putty is needed only to convert ppk private keyfile from Putty’s ppk to open ssh file format that works with Linux terminal.

To convert pkk in open ssh, you need to execute the following command:

user@performatune.com:~/Downloads>puttygen id_rsa.ppk -O private-openssh -o id_rsa

After that you can open Linux Terminal and execute the following command to establish connection:

user@performatune.com:~>ssh username@server_name -i /path/to/open_ssh/generated/file/id_rsa

Now you’ll need to enter a password for id_rsa.

This time, since I’m using default Linux terminal, copy/paste method was  working as expected.

 

Summary:

There are considerable amount of applications and services that still assume we are all living in a MS Windows world.

For that reason you need to find workaround to overcome issues related to such assumption.

Linux success is mostly related to it’s flexibility and infinite number of ways to configure and customize Linux for some specific task.

In this case, not only that Putty for Linux has been crippled in terms of functionality, but it bring issue that is specific for Linux version of that tool.

I assume that problem with copy/paste functionality is related to a difference way of working Windows and Linux clipboard manager.

Solution comes by using puttygen tool to do ppk file conversion, that is working fine on Linux.

 


Comments

There are no comments yet. Why not start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.