Tech Musings

Friday, December 14, 2007

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! :-)

11 Comments:

  • Hello, Jim Epler.

    Thanks for writing this blog entry. I've just been getting the same sort of error as you (it started appearing on Friday), and a Google search for information turns up your blog as the only source of information on it!

    The strange thing is that I get the more helpful message - the one headed "SSH Host Key Change" - even though I'm using Dreamweaver v8.0. However, this is on Microsoft Windows XP Professional, not OS X. Maybe they didn't make the same changes when updating the Windows version.

    Of course, the problem is, your solution is specific to OS X. I can't find the equivalent host key information file on this computer. So I'm still a bit stuck!

    Oh well, I'll keep looking...

    Oliver

    By Anonymous Oliver Pereira, at 2:11 AM  

  • Originally posted by Oliver Pereira:

    [However, this is on Microsoft Windows XP Professional, not OS X. Maybe they didn't make the same changes when updating the Windows version.]

    I,m using Windows XP also and this solution worked for me. I just did a search for the ssh_hosts file and found it and renamed it. Works great now!

    Thanks Jim :)

    By Blogger Ken, at 7:18 PM  

  • Wow, so glad I found your post, it may have saved me hours of trying to figure out things. I believe my situation is similar to what you mention - going to try to resolve it now. Thanks for the heads up - Bethany

    By Anonymous Bethany, at 9:58 AM  

  • Thanks for this! I had the same problem this morning and your tip fixed it :)

    By Anonymous Sheelah, at 3:51 PM  

  • Cudos Jim!

    Had the same problem, Argh! The techs at Hurricane Electric (host) were not helping and had no Dreamweaver expertise around. After reading your blog I discovered on my MAC OSX that my path was a bit different:

    ...Application Support>Macromedia>Dreamweaver 8...

    Then I trashed the file you mentioned and it worked!

    Thanks again

    By Blogger Museman, at 12:30 PM  

  • OSX Leopard Users:

    To fix the FTP issue go to
    1."Remote Info" then
    2. click on "Server Compatibility..."
    3. Uncheck "Use FTP performance optimization"
    4. Check "Use alternative FTP move method".

    That worked for me!

    By Blogger Jay Roach: Creative Director, at 5:54 AM  

  • OSX Leopard Users:

    To fix the FTP issue go to
    1."Remote Info" then
    2. click on "Server Compatibility..."
    3. Uncheck "Use FTP performance optimization"
    4. Check "Use alternative FTP move method".

    That worked for me!

    By Blogger Jay Roach: Creative Director, at 5:55 AM  

  • Hey Jim - Man I've tried a bunch of things, including your suggestion re: the .ssh file, which I can't locate on my machine anywhere.

    I'd very much like to pick this topic up where it left off and add my own problems that I'm suddenly experiencing and would HUGELY appreciate any rapid assistance.

    I'm running DW CS4 on Mac osx 10.5.5. I've been using DW for many versions to update my site and have never really had any problems with uploading using DW's ftp. The other night, my machine froze up for some reason, I believe my connection thru DW was still live to my server, when I had to do a manual shutdown. It didn't occur to me that that would somehow affect any of my permissions, but I think that might have something to do with something. At any rate, now, I am officially unable to upload any new files or overwrite previous files.

    I can connect without any difficulty, testing the server works, all my files appear in the remote view. When I go to upload a new file, I get:

    error occurred - An FTP error occurred - cannot put thisfile.swf. Access denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured.

    I've tried going into the server compatability area in site mgmnt & unchecking the ftp optimization, and checking - Use alternative FTP move method. All to no avail.

    Thanks a ton for whatever suggestions you can offer!

    By Anonymous senan, at 8:10 AM  

  • OK. Thanks for this blog post. I have found that FTP timeout was set to 2 sec, and it should be upped to something more than 2:

    You go to your site settings, click on the Firewall Settings, and FTP Timeout change to something more realistic - like 20-30 seconds.

    Or in the menu, Dremaweaver > Preferences > Site

    Than change FTP time out number to 20 or 30.

    BTW I'm using DW CS3 and OS X 10.5.6

    Hope this would help somebody. It drove me nuts. :o)

    By Blogger emhdesign, at 5:12 AM  

  • THANK YOU! when my host changed machines, i edited my person ssh_hosts file but didn't know dw had its own and it was driving me crazy.

    like museman, my configuration file was located at ~/Library/Application Support/Macromedia/Dreamweaver 8/Configuration.

    i just commented out the line with my former key and it worked just fine. thanks again!

    By Blogger gl., at 1:45 PM  

  • If somehow your access to ftp changes, this worked for me when suddenly I couldn't access a site via ftp:

    1. delete all items in applications/utility/keychain.app
    that relate to ftp settings
    2. restart mac
    3. delete cache in
    ~your_user_name/Library/Application Support/Macromedia/Dreamweaver9/Configuration/SiteCache/troubled_site_name

    By Anonymous Anonymous, at 2:58 PM  

Post a Comment

Links to this post:

Create a Link

<< Home