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

23 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 Anonymous, 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 Anonymous Anonymous, 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 Anonymous, at 9:58 AM  

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

    By Anonymous Anonymous, 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 Unknown, 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 Anonymous Anonymous, 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 Anonymous Anonymous, 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 Anonymous, 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  

  • Hello all,
    System details as follows: Mac OS 10.3.9 Dreamweaver MX.
    Error message as described by all, an ftp error occurred cannot make connection etc
    I hate Dreamweaver when it does this. I have spent hours/days attempting to fix alongside scanning the net for solutions and I really thought this sounded like the answer. Unfortunately I cannot find the SSH_hosts file anywhere on my machine.
    Now here is the way I have managed but it’s a pain in the arse. I have a 2nd copy of Dreamweaver MX residing on a 2nd drive on my machine which runs OS9. I open this copy whilst still in OSX on my main drive (I am aware you can run DW MX on 9 and 10).
    Oddly I can connect and upload through this copy and have been uploading files this way. I would work entirely this way, but it appears very unstable as other functions do not work, eg cannot edit sites, cannot delete files from remote (it bombs out when I attempt this) etc.
    Anyway, does this mean the problem is within the different copies of DW or is it system specific, ie are the prefs being used from OS9 or what?
    The only thing I can think changed about the time this problem began was that my IP changed from Tiscali to Talk Talk. But they are not actually hosting the sites I cannot connect to, but this is where I get confused.

    Any ideas?

    thanks, rob

    By Anonymous rob pryor, at 2:19 AM  

  • Worked like a charm... even in Dreamweaver CS4. Thank you!

    By Anonymous Anonymous, at 7:26 AM  

  • I searched forever and finally found your post! Thank you so much! I'm working in Dreamweaver CS5, by the way.

    Here's the path:

    ~/Library/Application Support/Adobe/Dreamweaver CS5/en_US/Configuration/ssh_hosts

    By Anonymous Anonymous, at 8:39 AM  

  • didn't work for me... i can connect but uploading files results in timeout error.

    any clue?

    By Anonymous Anonymous, at 1:56 AM  

  • Thanks so much. Solved my problem perfectly.

    By Anonymous Natalie, at 2:12 AM  

  • Thanks a lot! I can't believe that the problem still exists, and you can't find anything on Adobe's site to help. The error message is still just as unhelpful too. Thanks again.

    By Anonymous Ben, at 7:20 PM  

  • I'm currently working on an older version of Dreamweaver and found it hard to remedy this FTP problem. I was on the brink of frustration when this old article came out. Thanks for sharing this!

    web development melbourne

    By Blogger Bardolph, at 6:22 PM  

  • I'm still using Dreamweaver 3.0. This problem happened to me and this article gave me the clue to fix it. I couldn't find any hhs_hosts file on my computer. But then I went to the "Web server Info" on the definition settings box and checked "Use Passive FTP".

    Works like a champ now.

    By Anonymous Scott, at 9:59 AM  

  • Help Please. I cant find the SSH_hosts on my Mac, I have tried searching and looking at alt he paths you suggested but there simply is no SSH_hosts.

    Please advice.

    Best regards

    By Blogger 36 åringen, at 5:01 AM  

  • I'm also experiencing the same FTP error. I've tried looking for solutions online but haven't had luck.

    By Anonymous web design perth, at 6:29 PM  

  • I had to turn on hidden folder/files to see /Users/user.name/Library . . .

    By Blogger Milton Adams, at 9:17 AM  

  • your post is nice, informative & helpful for everyone. thanks for sharing.

    By Anonymous macromedia dreamweaver, at 11:20 AM  

Post a Comment

<< Home