ssh: connect to host localhost port 22: Connection refused

1.hadoop安装好之后,执行ssh localhost无法执行,

    提示“ssh: connect to host localhost port 22: Connection refused”。

2.ps -e |grep ssh查看后只有

    “3748 ?        00:00:00 ssh-agent"

3.安装

    sudo apt-get install openssh-server

4.启动sshd。

    sudo /etc/init.d/ssh start

5.再次查看:

ps -e |grep ssh
3748 ? 00:00:00 ssh-agent
4085 ? 00:00:00 sshd

6.执行ssh localhost

Linux kali 3.14-kali1-486 #1 Debian 3.14.5-1kali1 (2014-06-07) i686

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jan 15 09:21:21 2015 from localhost

 

成功!

posted @ 2015-02-13 15:30  cdsj  阅读(4058)  评论(0编辑  收藏  举报