---
title: "ssh connect to host  port : Connection refused"
author: "java--hhf"
date: "2016-03-15T12:01:15Z"
tags: []
categories: ["操作系统"]
slug: "ssh-connect-to-host-port-connection-refused"
draft: false
lastmod: "2016-03-15T13:27:23Z"
id: 2283100
url: "https://java--hhf.iteye.com/blog/2283100"
---

问题：ssh请求被拒绝

```
pruce@~$ ssh pruce@10.60.100.172
ssh: connect to host 10.60.100.172 port 22: Connection refused
```

 解决一：

```
#查看ssh是否正常安装
pruce1@~$ ps -ef|grep ssh
pruce1     3826   3743  0 11:56 pts/1    00:00:00 grep --color=auto ssh
```

 新Ubuntu没有安装openssh-server

```
#安装服务
sudo apt-get install openssh-server
```

```
pruce1@~$ ps -ef|grep ssh
root       3589      1  0 11:51 ?        00:00:00 /usr/sbin/sshd -D
root       3678   3589  0 11:52 ?        00:00:00 sshd: pruce1 [priv] 
pruce1     3742   3678  0 11:52 ?        00:00:00 sshd: pruce1@pts/1  
pruce1     3826   3743  0 11:56 pts/1    00:00:00 grep --color=auto ssh
```

 ssh链接正常，OK。