Ssh Login Error Connect To Host IP port 22: Connection Refused

While I try to connect the 10.0.0.1 using ssh I got the following error message
1)ssh 10.0.0.1
ssh: connect to host 10.0.1 port 22: Connection refused
But it is ping to that ip with out any issue. But
while I try to connect i can't login with ssh it through error message.
because 10.0.0.1 /etc/init.d/sshd stop
so I try to restart
2)[root@localhost ~]# /etc/init.d/sshd restart
Stopping sshd: [FAILED]
Starting sshd: /var/empty/sshd must be owned by root and not group or
world-writable.[FAILED]

3)[root@localhost ~]# ll /var/empty/sshd
total 8
drwxr-xr-x 2 rhel5 rhel5 4096 Feb 4 08:40 etc
/var/empty/sshd it should be owned by root
problem /var/empty/sshd not owner of the root user
4)[root@localhost ~]# chown root:root /var/empty/sshd
So change the ownership permission to the root-
Then I try it,It is resolved, I can connect from the master.
[root@localhost ~]# /etc/init.d/sshd restart
Stopping sshd: [FAILED]
Starting sshd: [ OK ]
ssh: connect to host 10.0.1 port 22: Connection refused

Related post