I was writing some PHP for a customer of mine and encountered a very annoying problem with Dreamweaver CS3, two problems actually….
Authentication Failures
The first was solved pretty easily, it seems that Dreamweaver won’t play nice with an sshd that isn’t configured to have PasswordAuthentication yes. So if you’re getting a login/password error the first thing to do is to goto the web server open up sshd.conf and make sure that the “no” is a “yes”, and then restart the ssh daemon. It seems “no” is default on a lot of Linux systems.
If you don’t have access to your sshd.conf, try contacting your server admin, if they don’t help you might be stuck using an application like Cyberduck (Mac) or WinsCP (Windows) for uploading files to SFTP.
Note: I have heard this could cause a security issue as it may enable “clear text” passwords which means your password may not be encrypted as it’s sent to the server. I can’t confirm this, so if anyone happens to know, please leave a comment.
SFTP Not On Default Port 22
The second problem is even more annoying: You can’t change the SFTP/SSH port in Dreamweaver CS3!!! What the hell Adobe?? We’re locked in to using port 22 as our SFTP, even if the server we’re working with is using 10022 (as was the case for me today). Although I love Dreamweaver and wouldn’t dream of using another app to write PHP in, I can’t believe that for the cost of it compared to other (free) software you can’t even change the SFTP port.
Okay, enough complaining… there’s got to be a work-around right? Of course! This work-around is only for Mac users, however Windows users will be able to do the same thing with plink.exe (available at The PuTTY web site). Using plink.exe to forward ports is somewhat confusing, so be prepared to do some research.If you’re using a Mac it’s much easier, what we’ll be doing is mapping port 22 on our local machine (IP 127.0.0.1 or localhost) to the remote ip address and remote port using the ssh command.
First, open up your Terminal and find out if you have any ssh-agent processes running. You can find out by typing:
ps aux | grep ssh
Note, you should see your ps command in the process tree, and nothing else.
If you do happen to have ssh-agent process running it means that port 22 on your local computer is already in use, so you’ll have to kill the process. To do this, type:
killall -9 ssh-agent
This should stop any ssh-agent processes.
Now that you’re positive port 22 is available on your local machine, you can forward it to the real SFTP port on the remote machine using the ssh command – simply type:
sudo ssh -L 22:localhost:22 -p 10022 username@domain.com
In Dreamweaver you need to modify your FTP Host from the real SFTP address to say “localhost” or “127.0.0.1”. This will point Dreamweaver’s SFTP client over to your local computer on the default port 22 which is set to map to the remote host on whichever port you have set up.
You can upload and download files like normal, as long as your Terminal is still open and logged in via the ssh command above.
“We’re locked in to using port 22 as our SFTP, even if the server we’re working with is using 10022 (as was the case for me today).”
I’ve been running down another issue and have read of a few others experiencing this issue. The most common response that I’ve seen that has resolved this is to tack the alternate port at the end of the FTP host name (e.g. ftphost.com:10022). I haven’t had a need to test out that advice, but it seems the most commonly recommended solution. Best of luck.
J, thanks for your comment. Unfortunately that option is not available in Dreamweaver. Where most browsers/apps will parse the X.X.X.X:XX as IP:Port dreamweaver looks at the :XX as part of the IP and will not parse it as the port. I wish it were that simple. I have had success using the forwarding option discussed in my blog post. If you need help doing it with Windows, let me know and I’ll post the instructions for doing it with PuTTY’s plink utility.
I don’t think it is fair to claim Dreamweaver CS3 doesn’t support non-standard SFTP ports. I’m running CS3 and the host:port syntax works on several servers, all with varying configurations and varying ports.
Quiller, are you using DW for Mac or Windows? I tried with the host:port syntax on my Mac and it was unable to find the IP Address. Mapping the port using the method in my post was the only way I could get it to work. I guess it could be something on my end, but after doing some Google-ing I don’t seem to be the only one with this problem.
Why is it that Dreamweaver does not support SFTP using ssl?
I’m using Dreamweaver CS3 on a Mac and the ip:port notation works perfectly with FTP and SFTP.
I have tested the solution proposed by J.Smith and it worked, so there’s no need to complicate things with port forwarding.
D-mah (and others), as it turns out, my problem was not the default SSH port, but as Jim points out on May 19th, the problem was with SSL. Currently the only work around for SSL is port forwarding – it just so happens I was using a non-standard port 22 and thought that was the issue. I will update the blog to reflect the inaccuracies when I have the time. Thanks!
Hi,
I had the same problem. I was trying to use SFTP in Dreamweaver CS3 and couldn’t do it. J Smith’s suggestion worked perfectly and it’s much simpler than mapping the local port which is labor intensive for 20+ web sites.
Here’s what I did:
domainname:2222 in DW Host field and selected User Secure FTP (SFTP). Two important notes:
1. if the domain uses www. , you need to include that in DW host field; eg
http://www.domainname.com:2222
2. If you use the Host Directory field, don’t use a preceeding / ; eg, instead of /www/site2, use www/site2
dreamweaversucks.com
Thanks for this – very helpful to know how to use nonstandard SSH ports with DW.
Andy – Glad I could be of assistance!
Thanks to the commenters that pointed out that this blog post is incorrect, and proposed the correct method to specify a port for Dreamweaver.
Cheers.
Jon, as you said, the commenters were correct, it’s not the default SSH port, but a problem with SSL as mentioned in my previous comment. I have yet to try this with CS4 to see if it’s been fixed, but I will make an update on the post soon.
Adam,
You’ll be pleased to know that PasswordAuthentication does not open you to the risk of passwords flying across the wire in the clear. Passwords are sent after cipher negotiations are complete, which means unless you enable “none/cleartext” as a cipher in your copy of SSH on the server, the password will ride along in a nice, encrypted pipe.
Separately, killall -9 is a VERY strong approach to killing a process. Just regular “killall” should be more than sufficient, and gives the process a chance to close itself up cleanly, deleting temporary and lock files, for example.
One last note: an easier way to identify what (if any) processes are using port 22 would be:
netstat -lntp | grep -F ‘:22 ‘
This will find the process regardless of the name it is using.
If any of this has been helpful, please consider BlackMesh for your managed hosting needs. Our legendary unlimited support includes any assistance with SSH configuration that you might need.
Regards,
BMDan
I use Dreamweaver CS3 on Windows XP and I can confirm that using a IP:PORT does work, at least if it is a public IP. I tested this by setting a new SSH port number and then turning off port 22, then specifying in dreamweaver x.x.x.x:xxxxx and it works.
Why are you jumping through all these hoops?
All you have to do is add the non-standard port number to the end of your domain name in dreamweaver.
i.e., if your sftp port is 2222
ftp host: yourdomainname.com:2222
done!
I think the whole FTP system of dreamweaver is a major handicap to any serious webmaster as it is so slow and inefficient!
Much easier:
xxx.xxx.xxx.xxx:pppp