ubuntu与SecureCRT连接不成功决绝办法

ubuntu与SecureCRT连接不成功决绝办法

 

系统为ubuntu 16.04, 在准备通过SecureCRT连接系统时,出现Connection timed out 的问题。

 

1.首先输入ssh localhost 指令查看ssh是否安装和启动,结果发现connect to host localhost port 22:Connection refused。造成这个错误的原因有可能是ssh-server未安装或者未启动。

2.运行ps -e | grep ssh指令查看是否有sshd进程,发现 1977 ? 00:00:00 ssh-agent 没有sshd进程。

3.输入 sudo apt-get install openssh-server安装server,Ubuntu下自动安装依赖项。

(遇到点问题,安装server自动安装依赖项失败,下面的代码照样执行了一遍,安装成功,看博客《解决openssh-server : Depends: libwrap0( = 7.6-4~)》)

4.直接用SecureCRT连系统,成功。