Following a recent increase in the frequency of brute force attacks on some of our servers, I finally decided to shut down all FTP services and to disable SSH password authentication, allowing only RSA authentication.

Unfortunately when it came to using Adobe Dreamweaver, I soon realized that I wouldn’t be able to use SSH keys. While the software supports SFTP connexions with password authentication, Adobe thought it wasn’t worth implementing support for SSH keys.

A Secure Workaround

While there is absolutely no way to make use of SSH keys in any version of Dreamweaver, here’s a little workaround:

  1. Download the Bitvise SSH Client (Tunnelier) here. It is free of charge for personal use.
  2. Launch the installer using all the default settings.
  3. Once the installation is completed, launch the Bitvise SSH Client software.
  4. Select the “Login” tab and enter the server’s hostname, the SSH port as well as the username:
    bitvise ssh tunneling 1
  5. Click on “User keypair manager”. This window will appear:
    bitvise user keypair manager
  6. Click the “Generate New” button to generate a new pair of SSH keys.
  7. Use following settings for your new SSH keys:
    generate new ssh keypair
  8. While you are not required to specify a passphrase, it is highly recommended to do so. If you don’t, anybody who gets their hands on your private SSH key file will be able to login to your server without any password. Once you are done, click on “Generate”.
  9. You will now see the new keypair:
    new ssh keypair
  10. Select the new keypair and click on “Export”. Select “Export public key” and “OpenSSH format”.
    export public ssh key
  11. Click on “Export” and save the public key file to your hard drive using the “.pub” extension (not that it really matters).
  12. Close the keypair manager window and select the “Services” tab:
    bitvise-services-ftp-to-sftp
  13. Enable the FTP-to-SFTP Bridge service and leave the default configuration settings to their default values so that the service is enabled locally only.
  14. Select the “Options” tab and de-select “Open Terminal” and “Open SFTP”:
    bitvise ssh terminal sftp options
  15. Click on “Save profile” from the main menu.
  16. Before you can establish a connexion to your server using your new SSH keys, you must import them on your server first. For this tutorial, I will be using cPanel to do so.
  17. Log into cPanel (http://www.yourwebsite.com/cpanel) and click on “SSH/Shell Access”:
    cpanel ssh manager
  18. On the next page, click the “Manage SSH Keys” button.
  19. Click on “Import Keys”:
    cpanel import ssh keys
  20. Enter your SSH key passphrase if you have one and copy the content from the public SSH key file (.pub) to the appropriate textarea. Click on “Import” when you’re done:
    cpanel import public ssh key
  21. Click on “Back to Manage Keys” and then on “Manage Authorization” next to the SSH key you have just imported:
    cpanel authorize ssh key
  22. Click the “Authorize” button. Your new public SSH key should now be authorized:
    cpanel imported ssh keys
  23. Now go back to Bitvise’s SSH client and click the “Login” button at the bottom to establish a connexion. You will be prompted to enter your passphrase if you specified one when creating the SSH key earlier.
  24. Once the SSH client has successfully established the connexion, launch Adobe Dreamweaver. Do not close the Bitvise SSH Client!
  25. Go to “Dreamweaver > Site > Manage Sites” and double-click your site to change its settings.
  26. Select “Servers” on the left and double-click the connexion you wish to modify:
    dreamweaver manage sites
  27. Select FTP as the connexion protocol and enter “localhost” in the “FTP Address” field. By default, the port should already be set to 21. Make sure to leave the username and password fields empty:
    dreamweaver ftp settings
  28. Click the “Test” button to test the connexion. If it fails, have a look at the SSH client log window for any error message:
    bitvise ssh client connexion log

If you are concerned about the fact that the FTP-to-SFTP bridge is accepting anonymous connexions, keep in mind that the service is listening on the localhost interface exclusively (127.0.0.1) which means that it will not answer to requests from any other device on your LAN or WAN.

Is your website slow?

Enter its URL below to find out now:

About the Author

Comments

  • mroncetwice

    AWSM. I was looking for exactly such a tutorial, however i ran into some issues that were particular to my specific dev environment.

    I’ve been experiencing issues with Dreamweaver CS6 sporadically changing file permissions on upload which would render files inaccessible, yada-yada.. Somewhere I found the suggestion of using SFTP instead of FTP, but Dreamweaver’s support of said protocol is minimal at best. After more searching the ‘net, I found mention of Bitvise for tunneling Dreamweaver’s connection, but SSH is fairly new to me and I was clueless how to get it all going.

    Your tutorial is great, but, as mentioned, my shared host server has some settings that required changes to the flow of your tutorial steps. First off I needed to change the key to DSA format. Even after, however, I was not able to connect/was getting an error message that provided little clue as to the solution.

    What ended up working for me was to create the key via my host’s cPanel, then used the “Import..” option in the Bitvise key manager. After that, I set up Dreamweaver’s connection as you’ve explained how to do it and everything is now working fine.

    Thank you so much.

  • Evan Meagher

    Worked like a charm just now. The new Bitvise was slightly different as it doesnt have a “pair” manager- separated into host and client now but worked all the same. Also I already have my keys so I didn’t generate, just chose them.