Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 02-09-2014, 07:00 AM   #1
LQ Newbie
Registered: Nov 2013
Posts: 2

Rep: Reputation: Disabled
SFTP Issue with Ubuntu 12 server

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:

Group Information:
uid=50005(test) gid=20003(test) groups=20003(test),20002(sftp-users)
Old 02-10-2014, 04:44 AM   #2
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
Hi! Just to isolate. Have you tried logging in to the server locally and changing to affected directories then do the ls command and see if you get the same issue.

Also, have you check your log files so you could see what's going on?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sftp issue priyanka mungekar Linux - Newbie 11 10-08-2012 07:36 AM
Chrooted OpenSSH SFTP server logging issue Sea-you Linux - Server 2 08-03-2011 09:09 PM
FTP/SFTP write access denied on Ubuntu Server prudens Linux - Newbie 1 07-18-2009 10:50 AM
cannot login into SFTP server using Net::SFTP cccc Programming 1 10-31-2007 06:23 AM
Files truncated by sftp/sftp-server at 65kb gato Linux - Networking 1 12-18-2003 10:29 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration