ubuntu下安装启动和卸载SSH

Posted 华天虎

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu下安装启动和卸载SSH相关的知识,希望对你有一定的参考价值。

想往VMWare虚拟机上的Ubuntu里面拷贝代码,发现之前安装好的secureCRT链接不上。发现是ssh安装配置出了问题,于是就把openssh-server卸载后重装,发现又是与openssh-client版本不一致(client是Ubuntu系统自带安装好的),于是又把openssh-client卸载后重装,终于把问题解决了。openssh安装很快,所以出现问题直接卸载重装还是相对更简单利落的。下面是相关操作:
    1、先停掉SSH服务:sudo stop ssh
    2、卸载openssh-server:apt-get remove openssh-server
    3、卸载openssh-client: apt-get remove openssh-client
    4、安装openssh-server:apt-get install openssh-server
    5、安装openssh-client:apt-get install openssh-client
    6、安装完成以后,启动服务:sudo /etc/init.d/ssh start  

    7、启动后,查看服务是否正确启动: ps -e|grep ssh  

 

 

    8、确认ssh-server已经正常工作: netstat -tlp

以上是关于ubuntu下安装启动和卸载SSH的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu下安装ssh

Ubuntu下SSH安装

Ubuntu16.04下安装并开启SSH服务

Ubuntu下SSH安装

Ubuntu16.0.4下安装卸载apache2服务

如何卸载ubuntu