Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
2014-12-24 15:14
881 查看
为什么要安装SSH?因为在Hadoop启动以后,namenode是通过SSH(Secure Shell)来启动和停止各个节点上的各种守护进程的。作为一个菜鸟,第一次使用Hadoop,安装配置有点复杂,到Ubuntu配置SSH这一步时,有点问题,经过琢磨后,发现了奥秘,现在把自己的一些心得分享下。
Ubuntu默认并没有安装ssh服务,如果通过ssh链接Ubuntu,需要自己手动安装openssh-server。判断是否安装ssh服务,可以通过如下命令进行:
问题分析如下:出现这个问题是因为Ubuntu默认没有安装openssh-server,我们用一个命令来看下,如果只有agent,说明没有安装openssh-server,命令如下:
既然问题找到了,我们就开始用命令来安装openssh-server,命令如下:
-e|grep ssh命令来看下,openssh-server安装上去没有。输入命令后出现如下截图,说明安装完毕,图中sshd就是我们所安装的。
最后,我们通过ssh localhost命令来看下,这个命令主要用来连接本机如果出现要输入密码,说明成功。
Ubuntu默认并没有安装ssh服务,如果通过ssh链接Ubuntu,需要自己手动安装openssh-server。判断是否安装ssh服务,可以通过如下命令进行:
ssh localhost结果我在这里发现了一个问题,如下:
问题分析如下:出现这个问题是因为Ubuntu默认没有安装openssh-server,我们用一个命令来看下,如果只有agent,说明没有安装openssh-server,命令如下:
ps -e|grep ssh效果如下:
既然问题找到了,我们就开始用命令来安装openssh-server,命令如下:
sudo apt-get install openssh-server安装完成后,我们再用ps
-e|grep ssh命令来看下,openssh-server安装上去没有。输入命令后出现如下截图,说明安装完毕,图中sshd就是我们所安装的。
ps -e|grep ssh
最后,我们通过ssh localhost命令来看下,这个命令主要用来连接本机如果出现要输入密码,说明成功。
ssh localhost
相关文章推荐
- Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在Ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 防火墙安装ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- ubuntu安装配置ssh-connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh:connect to host localhost port 22: Connection refused解决方法
- 解决connect to host localhost port 22: Connection refused问题
- ssh: connect to host localhost port 22: Connection refused : 通过系统日志排查问题
- ssh: connect to host localhost port 22: Connection refused 问题
- 在Ubuntu中ssh报错: connect to host localhost port 22: Connection refused 解决办法
- hadoop localhost:ssh:connect to host localhost port 22:Connection refused问题
- Ubuntu下安装OpenSSH Server使之可以被远程连接 ssh: connect to host 192.168.XX.XX port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused(ubuntu14.04_LTS)