2

I just finished installing Ubuntu Server 12.04.4 and was setting up ssh.

When I did $ sudo vi etc/ssh/sshd_config

I get something with no lines and the words [New Directory]

Is this the way it should be? My ssh_config file is ok. There's text in it.

Did I go wrong anywhere? How do I set this right?

Ninad
  • 386
Norman
  • 83
  • 2
  • 4
  • 12
  • LOL, I've stumbled upon this question for the 3rd time in last 24 hours, because I actually get empty /etc/ssh/sshd_config after reinstalling Ubuntu 16.04! – tishma Oct 09 '19 at 09:07

2 Answers2

5

I think the problem is a bit more simple than currently being suggested. Look at your command again:

sudo vi etc/ssh/sshd_config

There's no leading /. That means vi is trying to open <current-path>/etc/ssh/sshd_config so unless you're at /, it won't work.

The fix is to just specify the proper path:

sudo vi /etc/ssh/sshd_config
Oli
  • 293,335
-2

Yes it is absolutely normal there is nothing to do with it.. no worry..

it is basically OpenSSH SSH daemon configuration file

smn_onrocks
  • 526
  • 5
  • 14
  • So when I need to add rules like AllowUsers tom jerry do I add them to the ssh_config file or the sshd_config file – Norman Feb 20 '14 at 09:58
  • yes u can just make sure you write it properly.. – smn_onrocks Feb 20 '14 at 10:00
  • 1
    This is not true, after installing the ssh server the configuration file is not empty and you do not need to write everything by hand, it comes pre-configured! – Bruno Pereira Feb 20 '14 at 10:05
  • @maythux well, it does provide answer, even though it's wrong. In that case, downvoting is the right approach. – Olli Feb 20 '14 at 10:27