Tech Musings

Sunday, December 14, 2014

Dreamweaver, FTP and that annoying Cannot Make Connection To Host error

Macromedia Dreamweaver is one of my favorite software tools, but I'll be the first to admit it has its quirks. For example, one day from out-of-the-blue I suddenly lost my ability to use DW to make an ftp connection to my Web server. What the $#%&?!? I hadn't changed anything on my local system; I hadn't applied any OS or application updates; I was still able to connect to my server using other OS X ftp clients like Fetch and Fugo with the exact same authentication credentials, so I knew it couldn't be related to the remote account... darn it. One day the Dreamweaver 8 FTP client was working like a champ and the next day it threw the following error:

Macromedia Dreamweaver error message: An FTP error occurred - cannot make connection to host.Dreamweaver: An FTP error occurred - cannot make connection to host.

Wonderful. I tried to repair this litte annoyance by applying the standard "fix-its" like selecting and unselecting the "Use passive FTP" option, toggling the "Use Secure FTP (SFTP)" on and off in the Site Definition box, double and triple-checking my computer's firewall settings, dumping and recreating Dreamweaver preference file(s), re-creating my site's cache, etc, etc. Nothing made a difference. I did note that the DW error message thrown was a bit different depending on whether or not I selected the SFTP option in the site definition box. I received this alert if I didn't check the little SFTP box:

Macromedia Dreamweaver An FTP error occurred - cannot make connection to host. Access Denied. The file may not exist, or there could be a permissions problem.Dreamweaver Alert! An FTP error occurred - cannot make connection to host. Access Denied. The file may not exist, or there could be a permissions problem.

Why would this message be more verbose than the first, and why would there be a permissions problem? Hmmm... a few Google searches led me to a pretty good Dreamweaver FTP troubleshooting article on Adobe, but none of the suggestions listed in the technote were appropriate. In fact, because of that "Access Denied" error I assumed the problem was related to permissions. Thus, I spent a good deal of time chmodin' and chownin' around inside my file systems... all to no avail. I was ready to give up and resolve myself to using other third party ftp tools but decided to try one last thing and test my connection using Dreamweaver MX 2004, which by dumb luck still resided on my system despite the fact I'd been using Dreamweaver 8 for well over a year.

To my surprise, I was greeted with a completely different message...

Macromedia Dreamweaver: SSH Host Key Change. The host identification has changed for ---. The fingerprint of the host public key is:Dreamweaver: SSH Host Key Change - The host identification has changed for... The fingerprint of the host public key is...


A SSH host key change? Well, well, well... NOW we're getting somewhere! This alert provided me enough information to better understand my Dreamweaver FTP connection problem. Turns out my ISP had migrated my site to a new server and their SSH/SFTP host key had changed. I knew about this but thought I was in the clear because I had updated my known_hosts file in ~/.ssh with the new key. After all, Fetch and Fugo were able to make a secure ftp connection to my server without a problem, right? After some additional digging I discovered in a usenet post that Dreamweaver maintains its own host key information in a ssh_hosts file located under my OS X local user account here:

~/Library/Application Support/Dreamweaver 8/Configuration/ssh_hosts

and dumping this file turned out to be the fix.

What bothered me most about these shenanigans was that the more helpful error message was actually thrown by the OLDER Dreamweaver version— MX 2004!! Why hadn't Dreamweaver 8 provide me with this same SSH Host Key change alert? Doing so would have saved me at least an hour of troubleshooting. Baah! Silly Dreamweaver! :-)