-1

Last night I added UseDNS no to my sshd_config, after I restarted ssh via sudo service ssh restart, I found sshd not started and there is no process listened on port 22, but after I deleted UseDNS no, it will work as before.

I have compared with another server's sshd_config, only three lines are different (this server used sftp, so these lines are added):

Match User editor
ChrootDirectory /opt/ljmall-staging/var/editor-rootfs
ForceCommand internal-sftp

I have tried commet ChrootDirectory and ForceCommand, it doesn't work, it means Match User and UseDNS no is conflicted?

Server OS: Ubuntu 14.04.3 LTS
Openssh-server: 1:6.6p1-2ubuntu2.7
dawncold
  • 183
  • 1
  • 1
  • 12

1 Answers1

0

They are not in conflict, but Match creates a new conditional block and UseDNS is not allowed in the conditional blocks.

Moving UseDNS above the Match block will solve your issue.

Jakuje
  • 24,773
  • 12
  • 69
  • 75