Generate Public Key In Cyberduck

PuTTYgen is a key generator tool for creating pairs of public and private SSH keys. It is one of the components of the open-source networking client PuTTY. Although originally written for Microsoft Windows operating system, it is now officially available for multiple operating systems including macOS, Linux. PuTTYgen.exe is the graphical tool on Windows OS. While on the other side, Linux OS has the only command-line version could be accessible using SSH commands.

PuTTY Key Generator - a program to generate ssh private and public keys (download here) PuTTY (available here) FileZilla (available here) Steps. Open up PuTTY Key Generator, click 'Generate,' and follow the on-screen instructions; Once the key is generated, you will need to save the public key. Will need to download your private key to the machine you are working on in order to select it. Shown below is a screenshot of what your connection should look like. Press “Connect” to connect to the RMU academic server. RMU Information Technology - Using Cyberduck with SSH Keys - help@rmu.edu - 412.397.2211 - Rev A20130604.

I'm trying to connect to a server via ssh with public key. When I try ssh command from the terminal everything works fine: ssh user@server.org but when I try to connect from cyberduck I get '. Cyberduck is a file transfer client for Apple Mac and Microsoft Windows. Cyberduck is a fairly popular file transfer client for Apple Mac and Microsoft Windows. It supports FTP, SFTP, WebDAV, Amazon S3, OpenStack Swift, Backblaze B2, Microsoft Azure & OneDrive, Google Drive and Dropbox.

  • 1 Download PuTTYgen
    • 1.1 Download PuTTYgen on Windows
    • 1.2 Download PuTTYgen for Mac
    • 1.3 Download PuTTYgen for Ubuntu/Linux
      • 1.3.3 Types of Keys Supported on PuTTYgen

Puttygen aka Putty Key Generator

Generate Public Key In Cyberduck 2017

The key generation utility – PuTTYgen can create various public-key cryptosystems including Rivest–Shamir–Adleman (RSA), Digital Signature Algorithm (DSA), Elliptic Curve Digital Signature Algorithm (ECDSA), and Edwards-curve Digital Signature Algorithm (EdDSA) keys.

The aforementioned public-key cryptosystems principally focus on secure data transmission and digital signatures.

Although PuTTYgen collects keys in its native file format i.e. .ppk files, the keys can easily be converted to any file format. For Windows, the software interface is PuTTYgen.exe, whereas, for Linux OS the command-line adaptation is available using SSH commands.

How to use PuTTYgen?

PuTTYgen is used to generate public or private key pair for creating SSH keys. Below is the complete guidance about how to generate RSA key in the Windows operating system:

Key
  1. Once you install the PuTTY on your machine, you can easily run PuTTYgen. For the same, go to Windows -> Start Menu -> All Programs -> PuTTY -> PuTTYgen.
  2. You will see the PuTTY key generator dialog box on your screen
  3. You will find a “Generate” button in that dialog. Clicking on it will lead to generating the keys for you.
  4. Now you will need to add a unique key passphrase in the Key passphrase and Confirm passphrase field.
  5. Click on the “Save Public Key” and “Save Private Key” buttons to save your public and private keys.
  6. You will see the text starting with ssh-RSA in the Public key for pasting into OpenSSH authorized_keys file field which is located at the top of the window. Copy that entire text to your clipboard by pressing ctrl+c as you will require the key to paste on your clipboard in the public key tool of control panel or directly on the cloud server.

Various Ways to Use RSA Key Pair

RSA key pair generated through PuTTYgen is used in two various ways defined as below:

  1. To assign while creating a new cloud server
    You can choose the public key from the given list of keys at the time of creating a cloud server. If you don’t find your key in that list, then first add and then assign it.
  2. Assign to an existing cloud server
    At the time of connecting to the cloud server, first of all, you need to tell PuTTY to use it for utilizing your newly created RSA key pair.

PuTTYgen being a component of the terminal emulator PuTTY does not have to be downloaded separately, hence, comes with the PuTTY .msi installation package. You can follow the simple steps to download PuTTYgen software for your system. That is the reason why you don’t need to download PuTTYgen separately. Once you download PuTTY software, you will be able to install and run PuTTYgen easily in no time. Below is the complete instruction about how to download and install PuTTY on Windows.

Apart from that, it is also integrated into third-party programs such as WinSCP installation package. Below you can find a complete PuTTYgen download and installation guide for all operating systems.

Download PuTTYgen on Windows

To download PuTTYgen the primary requisite is to acquire the copy of PuTTY installation package. For the 64-bit operating system, one must install the 64-bit version of PuTTY, i.e. putty-64bit-<version>-installer.msi.Similarly, for the 32-bit operating system, the respective 32-bit version of PuTTY, i.e. putty-<version>-installer.msi needs to be installed.

To get PuTTY, go to PuTTY Installation Download page, whereby the complete installation package will be available with setup instructions, installation guide, and download links to all other components of PuTTY such as putty.exe, pscp.exe, psftp.exe, puttytel.exe, plink.exe, pageant.exe and putty.zip.


Following the successful download of the PuTTY installation package. It is time to install the program. Go to How to install PuTTY on Windows, whereby you will find the step by step guidance for PuTTY installation for Windows operating system.

After successfully downloading and installing PuTTY on your Windows machine, you are just 2-3 clicks away to run PuTTYgen. Follow the below-given step by step guidance to run PuTTYgen:

Generate public key in cyberduck free

Run PuTTYgen on Windows

To run PuTTYgen, Go to Windows -> Start Menu -> All Programs -> PuTTY -> PuTTYgen. You will see a window for the PuTTY Key Generator on your screen.

Voila! Now you can generate public or private key pair using PuTTYgen.

Download PuTTYgen for Mac


Below is the detailed guide to download PuTTYgen on Mac operating system. Mac OS has a built-in command-line SSH client known as Terminal. To utilize it, go to Finder and then opt for Go -> utilities from the top menu. After that find the terminal which supports SSH connections to remote servers.

However, to run PuTTYgen for mac, the first one must have to install PuTTY. There are multiple ways to install PuTTY, which are Homebrew or MacPorts. Both alternatives will also install the command-line of adaptations of PuTTYgen.

Ported PuTTY for Mac

Mac has the port of PuTTY which can be installed in various ways described as below:

  1. Installation using Homebrew:
    First, install the ‘brew command line’ Once installed use the below-given command to install PuTTY:-
    sudo brew install putty
  2. Installation using MacPorts:
    First of all, one must install MacPorts and then use the command-line to install PuTTY. Here is the command to install PuTTY via MacPorts
    sudo port install putty
    Additionally, a user can also add a shortcut to the desktop by writing the following command line
    –cp /opt/local/bin/putty ~/Desktop/PuTTY

However, there is an alternative way to install PuTTY on Mac OS. Cyberduck is a widely used Mac OS SSH Client. Once PuTTY installed on the Mac OS, a user can convert PuTTY derived private key format to OpenSSH.

To convert the private key to standard PEM format, type the following command –

puttygen privatekey.ppk -O private-openssh -o privatekey.pem

You can also read the guide to convert .pem file to .ppk using puttygen.

Download PuTTYgen for Ubuntu/Linux

To download PuTTYgen for Ubuntu (Linux) operating system, a user to first install PuTTY. However, in some Linux distributions, the SSH key generation tool – PuTTYgen needs to be installed independently from the PuTTY client.

For example, Debian Linux requires the below-given code to install PuTTYgen:

sudo apt install putty-tools

Generate Key Pair for Authentication in Linux

To create the key pair for authentication in Linux use the below command:-

puttygen -t rsa -b 2048 -C 'user@host' -o keyfile.ppk

Various Command Line Options of PuTTY in Linux

Below are few important command line options in the Linux operating system for PuTTY:

PuTTYgen [-t keytype [-b bits] [-q] | keyfile]
[-C new-comment] [-P]
[-O output-type | -p | -l | -L]
[-o output-file]

Options:

  1. Keyfile – It is the name of the existing key file to read at the time of changing the current key.
  2. t keytype – The command specifies the type of key to creating. Its acceptable values are RSA and dsa.rsa1.
  3. -b bits – This command specifies a total number of bit in a particular key. 1024 is the perfect size for DSA key, while 2048 or 4096 are the perfect size for RSA keys.
  4. q – The command suppresses the message about progress at the time of key generation.
  5. -C new-comment – The command will specify the comment to describe the key. It can be used for the new and/or existing key. Key operation is not affected by a comment. However, it is used to recognize the key owner, it’s not reliable completely as any value can be applied to it.
  6. –P – Using the command will update the passphrase of a key. Passphrase helps to encrypt the private key. As passphrase can’t add or update on a command line, it prompts a new passphrase tool to alter it.
  7. –old-passphrase-file – The old password of the key remains in this file. The command is used when the key is protected by a passphrase.
  8. –new-passphrase file – This command prompts the new passphrase of the key. It comes in the action either at the time of generating a new key or while applying –P command to change the passphrase.
  9. -O output-type – This command defines what to give in output. By default, the private key is the output.

Thus, above are the prominent commands of PuTTYgen in Linux operating system. Besides that, there are many other commands available to perform various tasks from the command prompt in Linux at flank speed.

Types of Keys Supported on PuTTYgen

It is important to know the types of key PuTTYgen supports prior to using it. Below are the key types that it currently supports for SSH-2 and SSH-1 protocol:-

  • SSH-1 protocol:- For SSH-1 only supports one key i.e. Rivest–Shamir–Adleman (RSA)
  • SSH-2 protocol: – SSH-2 supports multiple key types that include – Digital Signature Algorithm (DSA), Elliptic Curve Digital Signature Algorithm (ECDSA) and Ed25519.

The above description is a detailed brief on downloading and running PuTTYgen on all major operating systems. For further details please check the Download PuTTY page.

To get SSH or SFTP access to a server without using a password you need to have a SSH key pair for each computer you want to be able to access the server from. In this document I’ll describe the steps you need to take to generate a key pair if you don’t have one already. If you do, you can use your public key(s) to get access to the server.

I'll also explain how to connect to your server using Cyberduck. Click here to skip to that part.

Disclaimer and stuff

This guide is written with newbies in mind, so I'm very thorough in describing the steps that you must take.This guide will not cover setting up the server side of this system. It assumes that there's a server running with SSH enabled.Be very careful while following this guide. You could screw things up quite badly if you do something wrong. I am not responsible for any damages to your system.

Generating your SSH key pair

Generating your SSH key pair is different for *nix and Windows computers. If you're on a *nix computer follow these steps and if you're on a Windows computer follow these steps.

*nix (Unix / Linux / Apple OS X / etc.)

To generate a key pair on *nix systems you need to open up your Terminal application (command line). Within Terminal you can enter commands and execute them by pressing the enter key. In OS X you can find Terminal under Applications -> Utilities -> Terminal.

Step 1: Check for existing SSH keys

The first step is to check if you already have SSH keys on your computer. If so, you can use those for authentication and you shouldn’t overwrite them with new ones. If you do overwrite the existing SSH keys, you may not be able to access previously used servers anymore!

Enter the following command:

If the computer returns something like below you don’t have any existing SSH keys and can continue with step 2:

If the computer returns something like below you do have existing SSH keys and can skip to step 3:

Step 2: Generate a new SSH key pair

You can use the ssh-keygen command to generate a new SSH key pair as follows:

This command will take a while to run, since it's using 4096 bits in the key (as specified by the -b 4096 option). After a short while the computer will output the following:

Experienced users can enter an absolute path to the file they'd like to use as their private key, but we're going to press enter to choose the suggested file.

Now the computer will ask for a passphrase (a.k.a. password) for the key file. Enter a personal and strong password you can remember, preferably not your computer password. When you're typing nothing will change on the screen, but that's normal. When you're done typing you can press the enter key and it'll ask you to enter the same password again, do so and press enter again:

If you made a mistake here you'll have to enter the password twice again.

The computer will now protect your key with your password and afterwards it'll show something like this (probably without the bunny though):

Step 3: Copy your SSH key

To be able to authencticate you, the server needs to have your public key. Your sysadmin (the guy/gal who has control over the server) needs to have that key. This is quite easily done with the cat command:

Your computer will output your public SSH key and it'll look something like this:

Use your mouse to select this bunch of characters from ssh-rsa to user@hostname.local (yours will probably say something different). Now copy by using CTRL+C (or CMD+C if you're on a Mac) or by right clicking and choosing Copy.

Now you have the public key copied you can move on to Sending your public key to your sysadmin.

Windows

To generate an SSH key pair on Windows you need to have the PuTTYgen program. You can download that program here (download the puttygen.exe file).

Step 1: Create a folder for your SSH key pair

The first step is to create a folder on your computer for the SSH key pair. The best location is probably your My Documents folder. Use Windows Explorer (the program you use to find your files) to go to your documents folder. Now click on File on the top of the window and select New and then Folder. Name this folder ssh.

Generate Public Key In Cyberduck Free

Step 2: Generate your SSH key pair with PuTTYgen

Follow these steps to generate an SSH key pair with PuTTYgen:

  1. Open PuTTYgen by double clicking on the puttygen.exe file;
  2. At the bottom of the window you'll see a Parameters section, do the following:
    • For Type of key to generate select SSH-2 RSA;
    • At Number of bits in a generated key enter 4096;
  3. Click the Generate button;
  4. Move your mouse pointer over the area below the progress bar and keep moving it around untill the progress bar is full. PuTTYgen will now generate a new SSH key;
  5. Type a personal and strong password in the Key passphrase field and type the same password in the Confirm passphrase field;
  6. Click the Save public key button and save the key in the folder you created at step 1 with the following file name: id_rsa.pub;
  7. Click the Save private key button and save the key in the same folder as the public key, but name this one id_rsa.ppk;
  8. Right click on the Public key for pasting into OpenSSH authorized_keys file text field and choose Select All;
  9. Right click on the same field again and choose Copy.

Now you have the public key copied you can move on to Sending your public key to your sysadmin.

Step 3: Copy your SSH key (if you haven't already)

If you haven't copied your public SSH key in step 2, you have to open the file with Notepad and copy the contents from there:

  1. Start by opening Notepad: Click Start, Programs, Accessories and Notepad;
  2. Now in Notepad click on File and Open. Open the id_rsa.pub file in your ssh folder;
  3. Select all text by right clicking and choosing Select All;
  4. Right click again and choose Copy.

Now you can go to the last step: Sending your public key to your sysadmin.

Sending your public key to your sysadmin

With your public SSH key copied you can paste this into an email to your sysadmin and he or she will be able to do the rest. If you haven't copied your public SSH key yet you can find out how for *nix (Unix / Linux / Apple OS X / etc.) here and for Windows here.

If your sysadmin doesn't know what to do with the public key, or you're the sysadmin and you don't know what to do with the public key (I won't tell, I promise), this is what he / she / you need to do: append the public key to the /home/user/.ssh/authorized_keys file without newlines or spaces (apart from the spaces after ssh-rsa and before user@hostname.local). If the user doesn't exist on the server yet, you'll first need to add him / her / yourself.

Using Cyberduck to access your server

Cyberduck is a free (S)FTP program for Mac and Windows (sorry Linux users!). The main advantage of Cyberduck is that it allows you to select which SSH key you'd like to use to connect to a server. You can follow the steps below to find out how to connect to a SFTP server using Cyberduck.

Download, install and start up Cyberduck

Download Cyberduck here and install it on your computer. After the installation is done open the program.

Setup the connection

To setup the connection to your SFTP server follow the steps below:

  1. Click Open Connection:![Open connection image](http://blog.wioo.nl/content/images/2016/02/cd-1.png)
  2. In the window that opens choose SFTP (SSH File Transfer Protocol) at the top;![Select SFTP](http://blog.wioo.nl/content/images/2016/02/cd-2.png)
  3. Fill in the following information:
    • In the Server field enter the server address (IP address or hostname);
    • In the Port field enter the server SSH port if it's not 22;
    • In the Username field enter your username for that server;
    • Leave the password field empty;![Fill in the information](http://blog.wioo.nl/content/images/2016/02/cd-3.png)
  4. Click on More Options to open up that part of the window;![Open more options](http://blog.wioo.nl/content/images/2016/02/cd-4.png)
  5. Check the Use Public Key Authentication checkbox;![Check the checkbox](http://blog.wioo.nl/content/images/2016/02/cd-5.png)
  6. Select your private key file (id_rsa in *nix and id_rsa.ppk in Windows);![Select your private key file](http://blog.wioo.nl/content/images/2016/02/cd-6.png)
  7. Click the Connect button;![Click connect](http://blog.wioo.nl/content/images/2016/02/cd-7.png)
  8. You might get a dialog to verify the host, click the Allow button;
  9. You're now asked to fill in your Private Key Passphrase, fill in the password you've chosen for your SSH key and click the Login button.![Enter your password](http://blog.wioo.nl/content/images/2016/02/cd-8.png)

If everything went well you can now browse the files on your server!