How to connect to Acquia using SSH on Windows

Published on Author JFLeave a comment

 

Overview

This is one method to create a private/public key pair to connect to Acquia via SSH (either console or SFTP).

It is a three step process for Windows only using Putty .70 and Puttygen that comes with it (you can try other versions, of course):

  1. Ignore any instructions from Acquia – they don’t work (as of 7-18-2017)
  2. Install Git for Windows and use ssh-keygen that is installed
  3. Then convert those ssh-keygen into a usable format in Putty, Filezilla, etc., then connect

Do not use the Acquia Desktop to create SSH keys. Not only are there different versions that support different versions of Drupal, but their key gens may or may not work (although they used to work in the past)

Creating ssh key pair with ssh-keygen

  • Install Git for Windows https://git-for-windows.github.io/
  • Reboot
  • Create a folder in your local user account folder.
  • I created a folder called 0-acquia to only store the acquia ssh keys in (makes it easier to find).
  • Right click on that folder you created  > click Git Bash Here
ssh-keygen -b 4096
  • Copy the above and right click > paste into Git Bash window.
  • It will ask you for a file name. I called mine acquia-key (it will create two files).
    • You will use this same private/pub pair of files to create a second pair of usable files!

 

  • You must add a passphrase that matches complexity requirements. 

 

    • You can create the passphrase in a generator, then use right-click copy/paste in the Git Bash window so you don’t have to type it.  Lose this passphrase and you have to do this all over again.
  • Open your [new-ssh-key].pub in notepad or some other text editor and copy it.

 

  • Don’t modify this file at all. Open it, then CTRL+A, the CTRL+C

 

Add public key to Acquia account

  • Login to Acquia > Your Account > SSH Keys > Add SSH Key
  • Give it a label (I name it the same as the key but no underscores, etc.)
  • CTRL+V your public key into the space provided > click Add SSH Key
  • You have now added your public key!

Install Putty .70 (you can try other versions at your peril)

Download Putty from here.

If you have a pre-existing shortcut to Putty in the taskbar, for example, you need to make sure that you re-create it and that the version of Putty is actually .70

Convert your keys to usable formats using PuTTYGen

If you’ve added Putty to your Taskbar, you can right-click on it and then click PuTTYGen.

If it’s not there, go to the installation folder (make 10000% sure it is in the same folder as whatever version of Putty you are using), usually C:\Program Files\PuTTY\

These are the files I created.

acquia-key

acquia-key.pub


The one without the extension is the private key. They new private key you make will be .ppk and the public key will not have an extension. Makes sense, right? No, it doesn’t really.

Open PuTTYGen

  • Click Load
  • Select All Files
  • Click on
    acquia-key
  • Enter your passphrase
  • There’s a notification message about Save Private Key. Click OK.
  • Don’t touch any settings – leave them as is (example: even though you created the key at 4096 bit, PuTTYGen shows 2048)
  • Click Save private key
  • Save it as acquia-key.ppk (or something else – I saved it as -new so I can keep the original) in the same folder
  • Close PuTTYGen

Open Putty and connect to Acquia

If this works, you can use the same ppk file in other applications.

Log into Acquia and grab the information you need.

Applications > [App Name] > Prod (or whatever). Here’s an example:

  • [email protected]
    • Note that the address includes the username. Your SSH key is attached to that username. Copy the complete URL above and paste into Host Name
  • Add a connection name to Saved Sessions and click Save.
  • On left side click SSH > Auth > click Browse > find the ppk file you created in PuTTYGen. In this case it is acquia-key-new.ppk 

Scroll back up to Sessions and click SAVE or you will have to repeat this annoying process.

  • Copy your passphrase into memory
  • Then click Open!

If you copied your passphrase, right-click once and it will automatically copy it. Or type it in. Hit Enter.

DONE!

Acquia References

None – none of them I followed worked.

Please provide feedback below and good luck!

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.