Home Page
        Orders     Downloads     Support     Contact    

Creating Public/Private Keys on Windows for Access to Linux Servers

This is a beginner-friendly tutorial. The article shows how to generate public/private keys to login to a Linux account with SSH public/private key authentication.

Table of Contents



This article will show how to create a public-private key pair and how to set up a new or existing Linux shell account to use these for login.

Setting up a Linux server will always require some work on the Linux shell. This article will explain basic tasks with ZOC Terminal. If you don't have ZOC Terminal installed already, you can download it here. There will be a free trial with all features enabled, no ads for 30 days of actual use (i.e. if you use the program only once a week, the trial will last you for half a year).

To install ZOC Terminal, download it here. Installation is straightforward: During installation just go with the preselected values. If asked about your intended use, choose Access to Linux systems via SSH. Should you later decide that you do not like it, it will offer a quick and clean uninstall.

Create a RSA Key Pair

First you need to create a Public/Private key pair on your computer:

  • Start ZOC Terminal
  • Open the Tools-menu
  • Choose Public/Private Key Generator
  • Select RSA2, enter 2048 for the key length and change the name to id_rsa-aws (or instead of aws use any other identification for the key, e.g. your initials or something that refers to the server like dev or prod)
  • Choose a passphrase (this will be your password for using the key)
  • Click Create public/private key files
  • Click Close

Copy the Public-Key to the Clipboard

Still in ZOC Terminal:

  • From the Tools-menu choose Copy SSH Public-Key to Clipboard
  • Choose the id_rsa-aws.pub file (not the one without the .pub file type) and click Open
  • Click Close on the message that shows the public key

Add the Public-Key to the Account

The next step depends on who creates you Linux account:

If you have a service provider who creates the account for you and who asked for your public key, simply send or email him the public key data that you copied to the clipboard.

If you already have access to your Linux shell account via password authentication, login to the account and enter the following command:

echo xxxxxxxxxx >> ~/.ssh/authorized_keys
(between the quotes, instead of xxxxx, choose Edit-menuPaste to paste the public key, which you put to the clipboard in the last step, into the command)


Logging Into Your Linux Server Using Public/Private Key

  • Start ZOC and select File-menuQuick-Connect (or use this window if it automatically opens after starting ZOC)
  • Enter or select the following values:
    • Connect-To: (paste your servers's name or ip address)
    • Connection-Type: Secure Shell
    • Emulation: xterm
    • Username: (your username)
    • then click on Select Key... and choose the id_rsa-aws file (not the id_rsa-aws.pub file)
  • Click Connect


We Did It, Yay!

If you created the private key using a passphrase, a window will pop up to ask you for that.

After a moment should see a connection screen that shows the connection proceeding and eventually you will see the beloved $-prompt.


Now you are logged into the Linux using your public/private key pair.

If you liked how easy this was, please now allow us a little 60-seconds sales pitch for ZOC Terminal.

Why We Use ZOC Terminal Instead of PuTTY

You can perform the above tasks with a free SSH client like PuTTY as well.

However, while PuTTY is a reasonable choice for to access Linux shells every now and then, ZOC Terminal is designed for ease of use and effectiveness day in and day out. It offers elegant features that save you a lot time when performing routine tasks.

For example, as you saw, creating the key-pair and obtaining the public key takes only a matter of seconds (about 10 mouse clicks).

Connecting to your EC2 instance through the Quick Connect window is also very easy. If you log off and then realize you forgot something and want to connect again, you can simply press Alt+R in the disconnected tab. Alternatively, go to the Quick Connection window again and click Connect, so you are reconnected with just two mouse clicks.

For file uploads, you can upload files to your server merely by dragging them from the desktop into the ZOC terminal area.

If you are building multiple instances, you can save them from the Quick Connection window to the Host Directory. From there, you can even connect to multiple instances at once (each will then open in a separate tab).

Assume you need to update or install a package on five servers: Open the Host Directory, select the servers using shift+Mouseclick and click Connect. Then press Alt+C to open the Local Typing window. Type your command (e.g., sudo apt update && sudo apt install -y build-essential ), click Send to all tabs, press Enter and you have easily performed this task in under a minute. Press Shift+Esc to watch the parallel output in the Thumbnails overview. Below is a 60-second video which shows how it works and which also shows a few other functions because after updating 5 servers, within those 60 seconds there was even time left to show file uploads and tab colors ;-).

These are just a few examples that demonstrate how using a professional ssh client like ZOC can save valuable time compared to free tools like PuTTY (which admittedly does cover the essentials quite well).

Conclusion: Performing tasks with ease saves time and it also is more fun!








Terms of Use
Privacy Policy