ssh:connecttohostxxx.xxx.xxx.xxxport22:Connectionrefused

使用ssh时出现错误提示connect to host xxx.xxx.xxx.xxx port 22:Connection refused。

引起这个错误的原因是ssh-server没有启动或者没有安装(Ubuntu12.04默认只安装了openssh-client,没有安装openssh-server)。

1.查看openssh-sever是否启动

运行命令:ps -e|grep ssh

如果没有sshd进程,则使用如下命令:sudo /etc/init.d/ssh start


2.安装openss-server

如果提示ssh不存在,说明openssh-server没有安装,通过如下命令安装openssh-server。

sudo apt-get install openssh-server

你可能感兴趣的:(ssh:connecttohostxxx.xxx.xxx.xxxport22:Connectionrefused)