Question

Can't Connect to Server via SFTP

Asked by: EMB01

I am using a (dv) dedication-virtual server from MediaTemple.net and I'm tring to connect to it using the SFTP options in Dreamweaver MX 2004. Only, I get the following error:
An FTP error occurred - cannot make connection to host.
Dreamweaver could not connect because the server is down or not accepting connections.

I already did this:
http://kb2.adobe.com/cps/194/tn_19491.html

Please help.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-08 at 07:14:05ID24714866
Tags

sftp

,

connect

,

server

,

dreamweaver

Topics

Adobe Dreamweaver

,

FTP Software

,

Miscellaneous Web Development

Participating Experts
2
Points
500
Comments
36

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. SFTP and FTP
    Greetings, (i) What is the differnece between an FTP and SFTP? (Can u make the explanation bit simpler since i am not that technically sound in Unix) (ii) What are the process and modifications to be done while converting from the FTP to SFTP?? Thanks in Advance.
  2. Hosting with SFTP
    Hello, Could anyone recommend me a cheap hosting that includes SFTP access, or secure FTP, please ? Thank you
  3. Connecting with SFTP using Dreamweaver
    I upload files to a webserver which doesn't support FTP (and dozens that do - they're fine). I can log in using SFTP using SSH2 on Port 22 using CuteFTP Pro v6 using all of the default options. I can log in using Putty with the same username and password combination. I can...
  4. Java SFTP
    Hello, I need to do an SFTP from one Unix Server to another via my JSP web application to transfer some files. I tried using JScape´s trial but it doenst seem to work.. currently, I can only do sftp via command line at the shell like : sftp bob@10.50.20.12. Is there any fr...
  5. Dreamweaver - Nonstandard SFTP Port
    I am using Dreamweaver 8. A host for one of my websites has changed the default SFTP port. Is it possible to configure Dreamweaver to connect SFTP on a nonstandard port?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 07:25:42ID: 25282168

Could you test the connection with an ordinary client like http://winscp.net/eng/download.php ?

 

by: EMB01Posted on 2009-09-08 at 07:38:50ID: 25282303

I downloaded and tried connecting with my hostname, using port 22, my username and password, no private key file, and using the SFTP file protocol allowing SCP fallback... But, it didn't work. It said, "Cannot initialize SFTP protocol. Is the host running a SFTP server?"

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 08:00:54ID: 25282575

Are you sure the port is not changed to something else?

Can you connect to any other SSH/SFTP service? Maybe 22 is blocked.

 

by: EMB01Posted on 2009-09-08 at 09:03:57ID: 25283288

I think I could previously connect via Dreamweaver to a site on Yahoo's web server via SFTP; so I think the problem is with this server. How can I check if port 22 is block or not?

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 09:19:41ID: 25283440

Try this in command prompt:

telnet pingwin.icm.edu.pl 22

If you can see:
SSH-2.0-OpenSSH_5.1
you can access port 22 with no problems.

Try the same with your host. If it cannot connect either the server is inaccessible or the port is different.

 

by: EMB01Posted on 2009-09-08 at 10:04:46ID: 25283892

I saw SSH-2.0-OpenSSH_5.1. Since I can access the port, what's the problem, then?

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 10:08:42ID: 25283930

either the server is inaccessible or the port is different (not 22)

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 10:09:24ID: 25283944

Sorry.

Have you seen this when connecting to your host?

 

by: EMB01Posted on 2009-09-08 at 10:13:08ID: 25283977

Have I seen what?

All I see is (when connecting via SFTP with Dreamweaver):
An FTP error occurred - cannot make connection to host.
Dreamweaver could not connect because the server is down or not accepting connections.

And, when connection via SFTP with WinSCP:
Cannot initialize SFTP protocol. Is the host running a SFTP server?

Please help... My website was hacked recently (and iFrame attack) and so I need to change my passwords and use SFTP so that the packets can't be sniffed or something... I'm just an intermediate PHP programmer!

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 11:37:35ID: 25284746

Run in command prompt:

telnet xxx 22

replace xxx with an address of a server you connect to (in WinSCP and Dreamweaver)

Tell me what happend

 

by: EMB01Posted on 2009-09-08 at 12:05:12ID: 25285048

Where "xxx" is my dedicated-virtual server IP address:
# telnet xxx 22
Trying xxx...
Connected to xxx.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.3

 

by: EMB01Posted on 2009-09-08 at 12:06:40ID: 25285071

P.S. Do I need a record in my DNS like sftp.emarketbuilders.com? I notice I have an ftp.emarketbuilders.com CNAME record, that's why I ask.

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 12:16:29ID: 25285159

Is this (ftp.emarketbuilders.com) your real host name? I am able to connect to it. I am asked for a user name.

I do not know it, so cannot check further :-)

Was this message in WinSCP:
Cannot initialize SFTP protocol. Is the host running a SFTP server?
displayed after logging in?

Try to connect with putty:
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

and tell a result

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 12:17:40ID: 25285176

and what about FTP? Cannot you connect to ftp://ftp.emarketbuilders.com/ and update your site this way?

 

by: EMB01Posted on 2009-09-08 at 12:23:40ID: 25285247

I can connect; however, I am led to believe that using non-secure (FTP) is how my site was hacked in the first place. So, I wanted to change my passwords, and use SFTP, then update my website.

 

by: EMB01Posted on 2009-09-08 at 12:24:01ID: 25285254

* I can connect only with FTP, not SFTP as I'd like.

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 12:33:12ID: 25285358

The difference is that with FTP something can get your password by listening to the network. With SFTP it is more difficult.

If something is running on your server, it is able to do everything with your connection. No metter how you connect.

Could you answer my question about the message
Cannot initialize SFTP protocol. Is the host running a SFTP server
?

 

by: EMB01Posted on 2009-09-08 at 13:01:28ID: 25285613

Yes, I think it is connected, then disconnects because it says, "Connection unexpectedly closed. Server sent exit status 1." Or something like that.

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 13:16:55ID: 25285748

Have you tried with putty? If not, try and answer the following questions:

1. Do you receive "login as:" (or similar) prompt?
2. After entering a user name, do you receive "Password:" prompt?
3. What is going on after you enter a password?

 

by: EMB01Posted on 2009-09-08 at 13:27:13ID: 25285836

When connecting via SSH, I get the login and password prompt which (when entered correctly) allows me to operate the SHELL. When connecting via SFTP, I get no such prompt because as soon as it connects, it disconnects with the message above.

 

by: NetExpert-WarszawaPosted on 2009-09-08 at 13:34:14ID: 25285886

Run (in this shell):
grep sftp /etc/ssh/sshd_config
and give me a result

If you have no result, give me an output of:
uname -a

 

by: jason1178Posted on 2009-09-08 at 16:32:23ID: 25287086

EMB01,

First of all, Dreamweaver SFTP only supports port 22.  If you find out that you are connecting to a different port than 22, you are basically out of luck for a Dreamweaver-only solution.

There is a way to run DW SFTP in conjunction with a terminal window.  See here for instructions:

http://www.adambergman.com/2008/03/17/dreamweaver-and-sftp/

 

by: EMB01Posted on 2009-09-08 at 16:42:59ID: 25287146

# grep sftp /etc/ssh/sshd_config
Subsystem       sftp    /usr/libexec/openssh/sftp-server

@jason1178:
I know, I already read that exact article when I was trying to fix this... I think it's a problem with this server. Figuring out what exactly the problem is with the server is seemingly above my skill level and, so I came here.

 

by: jason1178Posted on 2009-09-08 at 16:45:56ID: 25287164

Okay.  You had mentioned the KB article which talks about one way to go around it.  Didn't know if you had seen the link I posted yet.

 

by: EMB01Posted on 2009-09-08 at 16:52:42ID: 25287204

Thanks for your help, anyway. I may have solved the problem by changing folder permissions; the previous setup was insecure... I'd like to fix this, though.

 

by: jason1178Posted on 2009-09-08 at 16:58:25ID: 25287230

Sorry, the above was the limit of my DW/SFTP troubleshooting skill set.  You seem to be in good hands with NetExpert-Warszawa so I'll slink back into my hole and let him continue.

 

by: EMB01Posted on 2009-09-08 at 17:03:17ID: 25287252

You sell yourself short, your officially a Genius in Dreamweaver! I agree about NetExpert, he seems to be asking the right questions and hopefully he'll help me to a solution.

 

by: NetExpert-WarszawaPosted on 2009-09-09 at 00:33:09ID: 25288947

Give an optput of the following:

ls -l /usr/libexec/openssh/sftp-server
grep LogLevel /etc/ssh/sshd_config
grep SyslogFacility /etc/ssh/sshd_config

Since the last command will probably give something like:
SyslogFacility AUTHPRIV

I will need an output of:
grep authpriv /etc/rsyslog.conf

I expect the output to include:
*.info;mail.none;authpriv.none;cron.none                /var/log/messages
authpriv.*                                              /var/log/secure

So give me this too:
grep -i sftp /var/log/secure
grep -i sftp /var/log/messages

 

by: EMB01Posted on 2009-09-09 at 05:17:16ID: 25290328

# ls -l /usr/libexec/openssh/sftp-server
-rwxr-xr-x 1 root root 47356 Aug 22  2008 /usr/libexec/openssh/sftp-server

# grep LogLevel /etc/ssh/sshd_config
#LogLevel INFO

# grep SyslogFacility /etc/ssh/sshd_config
#SyslogFacility AUTH
SyslogFacility AUTHPRIV

# grep authpriv /etc/rsyslog.conf
grep: /etc/rsyslog.conf: No such file or directory

# grep -i sftp /var/log/secure
Sep  8 05:35:05 emarketbuilders sshd[12245]: subsystem request for sftp
Sep  8 06:12:55 emarketbuilders sshd[9913]: subsystem request for sftp
Sep  8 06:13:05 emarketbuilders sshd[10138]: subsystem request for sftp
Sep  8 06:51:17 emarketbuilders sshd[12117]: subsystem request for sftp
Sep  8 06:52:16 emarketbuilders sshd[14240]: subsystem request for sftp
Sep  8 06:58:43 emarketbuilders sshd[31817]: subsystem request for sftp
Sep  8 07:38:33 emarketbuilders sshd[7421]: subsystem request for sftp
Sep  8 12:51:09 emarketbuilders sshd[5298]: subsystem request for sftp

# grep -i sftp /var/log/messages
[doesn't do anything]

 

by: NetExpert-WarszawaPosted on 2009-09-09 at 05:46:03ID: 25290557

Looks good so far.

Do this:
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_sftp
vi /etc/ssh/sshd_config

It opens a configuration file for SSH. We will edit it. Press (case sensitive and mind two spaces) the following keys:
/sftp[ENTER]
A -l VERBOSE[ESC]ZZ

The line you modified should now look like this:
Subsystem       sftp    /usr/libexec/sftp-server -l VERBOSE

Now:
ps -x | grep sshd

You will see something like:
 9319  ??  Is     0:00.00 /usr/sbin/sshd
 9321  ??  Is     0:00.05 sshd: your_username [priv] (sshd)

The number (process id) for /usr/sbin/sshd is important for us. It is 9319 here and you have something else.

Type the following:
kill -HUP xxxxx

where xxxxx is your process id (the one for /usr/sbin/sshd). Before you press enter, check it once more. If anything is not clear for you, do not press enter and ask.

Now try to connect with SFTP and give me:
grep -A 10 'subsystem request for sftp' /var/log/secure

I need just the last connection attempt, so you can ommit everything before tha leas "subsystem request for sftp".

Before you post a response, review it and mask any sensitive information (if you find any).

 

by: EMB01Posted on 2009-09-09 at 06:08:00ID: 25290802

When I edit /etc/ssh/sshd_config, where do you want me to put:
/sftp[ENTER]
A -l VERBOSE[ESC]ZZ

?

 

by: NetExpert-WarszawaPosted on 2009-09-09 at 06:27:49ID: 25290965

Just type it.

/ is a search command. It will move a cursor to the bottom and sftp will appear there when you type it. Enter will start the search. The cursor will be moved to the line:
Subsystem       sftp    /usr/libexec/sftp-server

Now you press A (Shift+a). This will switch to an edit mode and place the cursor at the end of the line.
-l VERBOSE is a parameter that we want to add there.
Pressing escape will finish editing and pressing Z twice (Shift+z) will save and quit.

 

by: NetExpert-WarszawaPosted on 2009-09-10 at 12:51:41ID: 25303600

How is it going?

 

by: EMB01Posted on 2009-09-15 at 05:19:53ID: 25334006

Thanks for checking back me.  I'm sorry I took a while to respond.

I prefer not to mess with the shell at this point as since I've changed file and folder permissions, I've not been hacked...  I'll repost a new question if, again, my security is compromised.

I'll accept your suggestions as a solution to this question.

 

by: EMB01Posted on 2009-09-15 at 05:23:50ID: 31626080

Thanks. I have inadequate skills in shell and I don't really want to risk breaking anything (as I have in the past).  I may have to if the symptoms return.  Have a good day.

 

by: NetExpert-WarszawaPosted on 2009-09-15 at 06:19:33ID: 25334536

OK. Mail me if you would like me to look at your another question.
Good luck

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...