Please know I am no sysadmin.
Yesterday I re-installed UBUNTU 12.04 LTS - running 3.2.0-33-generic-pae.
I have worked for hours trying to install vsftpd to no avail, and now find myself trying to configure sftp via the sshd, if that makes sense.
ps -ef |grep ssh
00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session gnome-session --session=ubuntu
NOTICE THE SIZE of my sshd_config
ls -la /etc/ssh/
-rw-r--r-- 1 root root 125749 Apr 2 2012 moduli
-rw-r--r-- 1 root root 1669 Nov 18 11:58 ssh_config
-rw-r--r-- 1 root root 1668 Nov 18 11:47 ssh_config~
-rw-r--r-- 1 root root 20 Nov 18 11:25 sshd_config
-rw------- 1 root root 672 Nov 18 11:29 ssh_host_dsa_key
-rw-r--r-- 1 root root 598 Nov 18 11:29 ssh_host_dsa_key.pub
-rw------- 1 root root 227 Nov 18 11:29 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 170 Nov 18 11:29 ssh_host_ecdsa_key.pub
-rw------- 1 root root 973 Nov 18 11:29 ssh_host_key
-rw-r--r-- 1 root root 638 Nov 18 11:29 ssh_host_key.pub
-rw------- 1 root root 1675 Nov 18 11:29 ssh_host_rsa_key
-rw-r--r-- 1 root root 390 Nov 18 11:29 ssh_host_rsa_key.pub
-rw-r--r-- 1 root root 302 Jan 10 2011 ssh_import_id
when I sudo /etc/init.d/ssh restart it starts the ssh, but why not the sshd?
Thank You, David
You can't have sshd running with a bad sshd_config. I don't know what's in that 20 byte sshd_config of yours, but it's broken. Probably best to just reinstall the default at this point.
I've recreated your problem here in a VM:
As you can see, sshd did not restart when I removed sshd_config. Now, here's something interesting:
So, a completely blank sshd_config is sufficient to get it started. I DO NOT RECOMMEND THAT YOU DO THIS, HOWEVER. Instead, let's purge openssh-server and reinstall it, to restore the ORIGINAL, default sshd_config:
As you can see, we now have sshd running again, and with our default (87 lines long) sshd_config file.
In the future, I would recommend making backups of any config files you're experimenting with -
cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
or similar. :)