ssh: connect to host localhost port 22: Connection refused 问题
2014-04-28 11:37
951 查看
转载:/article/2465146.html
命令
$ssh localhost
错误信息:ssh: connect to host localhost port 22: Connection refused
错误原因:
1.sshd 未安装
2.sshd 未启动
3.防火墙
4.需重新启动ssh 服务
解决方法:
1.确定安装sshd:
$sudo apt-get install openssh-server
如果已经安装,会有以下提示信息:
如果没有安装,就会直接进行安装
2.启动sshd:
$sudo net start sshd
3.检查防火墙设置,关闭防火墙
$sudo ufw disable
4.检验是否成功,运行下面命令,若链接成功则表示安装成功,否则没有安装成功
$ssh localhost
-------------------------------------------------------------------------------------------------------
但是有的时候虽然成功了,但是还是会出现Connection refused问题,这时,需要查看一下sshd进程是否启动
运行下面命令,查看是否有sshd进程:
$ps -e | grep ssh
有时候虽然可以看到sshd,但是还是不能连接成功,这时候就要重新启动一下ssh,运行下列命令
$sudo service ssh restart
然后再次连接
命令
$ssh localhost
错误信息:ssh: connect to host localhost port 22: Connection refused
错误原因:
1.sshd 未安装
2.sshd 未启动
3.防火墙
4.需重新启动ssh 服务
解决方法:
1.确定安装sshd:
$sudo apt-get install openssh-server
如果已经安装,会有以下提示信息:
如果没有安装,就会直接进行安装
2.启动sshd:
$sudo net start sshd
3.检查防火墙设置,关闭防火墙
$sudo ufw disable
4.检验是否成功,运行下面命令,若链接成功则表示安装成功,否则没有安装成功
$ssh localhost
-------------------------------------------------------------------------------------------------------
但是有的时候虽然成功了,但是还是会出现Connection refused问题,这时,需要查看一下sshd进程是否启动
运行下面命令,查看是否有sshd进程:
$ps -e | grep ssh
有时候虽然可以看到sshd,但是还是不能连接成功,这时候就要重新启动一下ssh,运行下列命令
$sudo service ssh restart
然后再次连接
相关文章推荐
- 防火墙安装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问题)
- 在ubuntu中配置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 问题
- Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
- hadoop localhost:ssh:connect to host localhost port 22:Connection refused问题
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- Ubuntu 安装配置SSH(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 : 通过系统日志排查问题
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused (2)
- ssh: connect to host localhost port 22: Connection refused (3)
- ssh:connect to host localhost port 22: Connection refused解决方法
- ssh: connect to host localhost port 22: Connection refused(ubuntu14.04_LTS)
- 解决connect to host localhost port 22: Connection refused问题