Link to home
Start Free TrialLog in
Avatar of janhoedt
janhoedt

asked on

SFP on Synology

Hi,

I tried to install/run SFTP on my Synolgy NAS DS 210J (latest version of OS, don't know which Linux version is under the hood).
Therefore I followed this article: http://forum.synology.com/wiki/index.php/How_to_setup_an_sftp-server

I can ssh with putty but not sftp. Config of server should be ok, this is most important line:
Subsystem      sftp    /usr/libexec/sftp-server
But it does not work. Can you assist me in troubleshooting?


This is the connection log:
--------------------------------

Status:      Connecting to 192.168.1.6:22...
Response:      fzSftp started
Command:      open "root@192.168.1.6" 22
Command:      Pass: *********
Status:      Connected to 192.168.1.6
Error:      Fatal: unable to initialise SFTP on server: could not connect
Error:      Could not connect to server
Status:      Waiting to retry...
Error:      Connection attempt interrupted by user

This is the config of the server:
--------------------------------------
/etc/ssh/sshd_config

#       $OpenBSD: sshd_config,v 1.82 2010/09/06 17:10:19 naddy Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes

#ListenAddress ::

# The default requires explicit activation of protocol 1
#Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2

#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#UsePAM no

#AllowAgentForwarding yes
#AllowTcpForwarding yes
# no default banner path
#Banner none

# override default of no subsystems
Subsystem      sftp    /usr/libexec/sftp-server
#Subsystem       sftp    internal-sftp -f DAEMON -l VERBOSE
#Subsystem       sftp    /usr/syno/sbin/sftp-server -l DEBUG3

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server
~

Avatar of parparov
parparov
Flag of United States of America image

Do you actually have an executable /usr/libexec/sftp-server ?
ASKER CERTIFIED SOLUTION
Avatar of Papertrip
Papertrip
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of janhoedt
janhoedt

ASKER

There is no sftp at the location you mention:

DS> cd libexec/
DS> ls
SynoindexShareCommon.sh  share_delete             share_set
But it should be installed as

DS> ipkg install openssh-sftp-server
Package openssh-sftp-server (5.9p1-1) installed in root is up to date.
Nothing to be done
Successfully terminated.
Did you try my suggestion?
I will
What does 'ipkg files openssh-sftp-server' output?
Have to park this question since I cannot troubleshoot this for the time being. Will reopen/refer to it when timeslot would occur.
Please see latest remark, can't ask other question without closing this so I'll have to close. Will reopen/refer to this later.