DurgaPrasath's picture


I am facing issue with SFTP service configured on Ubuntu 12 server. I am able to connect to sftp service and pwd command gives an immediate response while ls command takes 5 to 10 minutes to return the output. This is giving me connectivity issues when i try to connect SFTP service using FileZilla Client.Please find the Server Config below.

sftp -vvv output:

debug3: SSH_FXP_REALPATH . -> /test
sftp> pwd
Remote working directory: /test
sftp> ls
debug3: Sending SSH2_FXP_READDIR I:32537

so ls command stucks at this point for atleast 5 to 10 minutes and then displays output. Once output is displayed then it is faster navigating through directories.

I also verified putting some files onto SFTP and it is faster. It gives very slow response only for ls command and get commands but for uploading a doc using put command or pwd it is faster.


SSHD Config File:

Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel DEBUG 
LoginGraceTime 120
PermitRootLogin no
AllowGroups ssh_access_p3 sftp-users sftponly
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 internal-sftp
UsePAM yes
Match group sftponly
    ChrootDirectory /sftp-only/test-root/
    X11Forwarding no
    AllowTcpForwarding no
    ForceCommand internal-sftp

SFTP Directory Permissions:

drwxr-xr-x 4 root root 4096 Feb  7 13:38 /sftp-only/
drwxr-xr-x 3 root root 4096 Feb  7 13:38 /sftp-only/test-root/
drwxr-xr-x 2 test test 4096 Feb  7 13:38 /sftp-only/test-root/test/


Password Entry:
test:x:50005:20003::/test:/bin/bash

Group Information:
uid=50005(test) gid=20003(test) groups=20003(test),20002(sftp-users)

Forum: 
Tags: 
Jeremy Davis's picture

Turnkey Linux appliances (i.e. the forums you are posting on here) come with SFTP already preconfigured and also it is based on Debian stable (not Ubuntu) so I'm not sure whether you'll get much comment here.

The only thing that I can think of is have a quick read of this blog post from a few years ago.

Add new comment