Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In addition to what's stated in the title, I'm also able to ncftp successfully into a different server. But on server A, I get this

Could not connect to xxx.xxx.xxx.xxx -- try again later: Connection timed out.

indefinitely. These are Ubuntu 10.04, 64-bit servers. Is there some server-side setting I need to change on the server A to get it to work? (And if anyone's wondering, I need ncftp because it lets me upload a directory with subdirectories, whereas with (s)ftp there is apparently no way to do this.)

share|improve this question
add comment

4 Answers

up vote 7 down vote accepted

Both ssh and sftp connects using the ssh daemon on the remote host, using port 22/tcp while FTP is an entirely separate protocol/service, using other port(s). To allow ncftp to work you have to make sure that the remote server uses a properly configured FTP daemon (such as proftpd, vsftpd, ncftpd) and that no firewall policies block in/outgoing access on either of the machine you are connecting from, or the server.

In your case you probably want to use scp, another utility in the ssh toolbox. It allows you to recursively copy directories over ssh. Just use this syntax:

scp -r folder/ user@remote.host:

It will recursively copy the folder named folder to the user account user on remote.host. Its important to include the : after the hostname, its how scp expects to see it, otherwise it will attempt to copy the folder into a file called user@remote.host on your source/local computer.

You can also use scp to copy single files, ofcourse.

share|improve this answer
Using scp will also be much faster than SFTP if all you want to do is copy files. –  Starfish Jan 21 '12 at 2:17
Ok great, this works. I'd still like to know why ncftp isn't working, even after I installed vsftpd (see comment to @Starfish below), but scp is getting job done as I write this. –  Matt Phillips Jan 21 '12 at 2:35
You just did a clean vsftpd installation, so you should be able to just logon right away with a normal user account. Because this doesn't work, and you time out, I would guess at a firewall blocking traffic either at your clients side (where you run the FTP client) or on the server side (where you installed vsftpd). Check that out! If you are behind a firewall/NAT you might have to tell your FTP client to run passive mode (like web browsers) instead of active, but this usually ends up being a problem AFTER logging in, so probably firewalled! :) –  Mattias Ahnberg Jan 21 '12 at 2:48
@Mattias looks like that's definitely the issue, I'll have to work on that. –  Matt Phillips Jan 21 '12 at 4:09
add comment

It sounds like you do not have an FTP server installed on your Ubuntu server. Despite how similar they look in name, SFTP and FTP are two incompatible protocols. You will need to install an FTP server onto your server if you wish to connect to it with ncftp. apt-get install vsftpd will install the vsftp server on Ubuntu.

share|improve this answer
Thanks, this sounds promising and trying it I got Setting up vsftpd (2.2.2-3ubuntu6.3) ... Adding user ftp to group ftp vsftpd start/running, process 22406 so it seems like it installed correctly, but still the same error. –  Matt Phillips Jan 21 '12 at 2:24
If you want to look into how the FTP daemon on Ubuntu works, check this URL: help.ubuntu.com/11.10/serverguide/C/ftp-server.html –  Mattias Ahnberg Jan 21 '12 at 2:25
It sounds like a firewall is blocking access to the FTP server. What happens if you run telnet servername 21? Do you ever see the text Connected to servername? –  Starfish Jan 21 '12 at 3:29
Nope, it won't connect. Looks indeed like I'm getting blocked by the firewall. I'll look into that, thanks for your help! –  Matt Phillips Jan 21 '12 at 4:12
add comment

sftp is not "ftp" per se, but rather a file transfer application that gives a command-line FTP-ish interface. ncftp is a "real" ftp client, which uses the FTP protocol. You will need to turn on the ftp service. Take a look at this for the difference: http://en.wikipedia.org/wiki/Secure_file_transfer_program

Here's Ubuntu's documentation on vsftpd:


share|improve this answer
add comment

Last I checked, ncftp communicates via the standard ftp protocol. SFTP by default communicates vi the ssh protocol.

More likely than not, an FTP server is not installed on the machine. You will probably need to install that, although I might advise that you just stick with sftp if you can help it, as ftp transmit data over the clear.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.