ubuntu安装ssh失败

错误原因

The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu2.8) but 1:7.2p2-4ubuntu1 is to be installed
                  Recommends: ncurses-term but it is not going to be installed
                  Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

执行 apt-get install openssh-client=1:6.6p1-2ubuntu2.8
再安装
apt-get install openssh-server
成功了。

 

 启动命令

/etc/init.d/ssh start

重启命令

/etc/init.d/ssh restart

停止命令

/etc/init.d/ssh stop

 

判断是否有启动

ps -e|grep ssh

 

链接其他电脑

ssh 用户名@ip地址

输入密码则进入,输入exit退出

posted @ 2017-02-22 23:58  张锡斌  阅读(4076)  评论(0编辑  收藏  举报