3

I am dumfounded at this issue. Brand new Ubuntu 12.04 Server install, I can SSH in, but can't use SFTP (Using Filezilla). It seems to authenticate fine .. But then it errors:

The error is:

Error:  Connection timed out
Error:  Could not connect to server

Here is the full transaction:

Status: Connecting to 10.2.1.102...
Response:   fzSftp started
Command:    open "username@10.2.1.102" 22
Command:    Trust changed Hostkey: Once
Error:  Connection timed out
Error:  Could not connect to server

Here is my sshd_conf file:

Port 22

Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key

UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 768


SyslogFacility AUTH
LogLevel INFO


LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes


IgnoreRhosts yes

RhostsRSAAuthentication no

HostbasedAuthentication no

PermitEmptyPasswords no

ChallengeResponseAuthentication no

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes


AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes

I am going around in circles, I don't know what to check next etc .. Any help guidance on what to check next and or test, would be greatly appreciated.

8
  • Have you checked the permissions on the directory you're trying to SFTP to ? I think root has to own the repertory that is its parent (long time I did that). Apr 9, 2013 at 18:37
  • Set LogLevel DEBUG, restart the ssh service and check your logs on the server side.
    – dawud
    Apr 9, 2013 at 18:39
  • I am connecting to /var/www User root owns var and the connecting user username owns www. Does this need to change?
    – Zak
    Apr 9, 2013 at 18:43
  • Done, where can I view the logs? There is no /var/log/ssh
    – Zak
    Apr 9, 2013 at 18:47
  • In Debian and derivatives, it's /var/log/auth.log if you didn't change the stock syslog configuration.
    – dawud
    Apr 9, 2013 at 18:48

1 Answer 1

4

FileZilla has done this to me in the past to. The problem was that filezilla tryed to use the ftp protocol when in fact sftp was needed even when i entered port 22 as my port. To solve this, enter: sftp://YOUR_IP_HERE as your host.

1
  • 1
    From provided log, it's clear the SFTP is used in this case ("fzSftp started" and "Trust changed hostkey") Apr 11, 2013 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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