today I started to work on SFTP setting to implement a real-time sync.

despite the basic default consiguration /etc/ssh/ssh_config file

host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes

the server do not follow this config file. By instance after creating few users, despite I used

DenyUsers USER1,USER2

I could still connect remotely with SSH

As well despite there is no Subsystem about sftp I can access via sftp $sftp user1@remote.host

I also followed this link but when I was logged in I could move around the whole file system and could not restrict the user to one directory

At the end it seams to me there are some other files overriding the default setting file or there is something I can't see.

General question: after every change to the file /etc/ssh/ssh_config I restarted the ssh daemon with

service ssh restart

Considering I work remotely with the server via ssh, should not the connection drop after every restart? This do not happen


  • You appear to be editing the client-side configuration file - the server-side configuration is in /etc/ssh/sshd_config – steeldriver Feb 15 at 18:18
  • I edit the server side file...and this is driving me crazy!! – gipsea Feb 15 at 18:29
  • accordingly to the file list find here: [link]packages.ubuntu.com/bionic/i386/openssh-client/filelist the file /etc/ssh/ssh_config come with the openssh-client although in all tutorial this is the file referred to be server config file. any hint? – gipsea Feb 16 at 9:29
  • The instructions in the link you posted clearly say to edit the sshd_config file (sudo nano /etc/ssh/sshd_config) – steeldriver Feb 16 at 10:04
  • ciao @steeldriver ... I've just figured out too!!! Thanks to everyone – gipsea Feb 17 at 16:14

Your Answer

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

Browse other questions tagged or ask your own question.