ubuntu 16.04安装并启动openssh

对于没有图形界面的linux系统,一般都会用到远程连接控制,,因此新安装的linux系统,在配好网络后,首先要安装的就是远程连接工具,ssh是常用的方法。

  1. ps -ef |grep ssh  //查看系统是否已经启动了ssh
  2. sudo su   //切换为使用root用户安装
  3. apt-get install openssh-server  //安装ssh 服务,Ubuntu默认安装了ssh client端的
  4. vim /etc/ssh/sshd_config  //修改配置文件,如下
    # Authentication:
    LoginGraceTime 120
    PermitRootLogin yes  //改为yes
    StrictModes yes
  5. ssh服务的启动,关闭,重启
    /etc/init.d/ssh start 
    /etc/init.d/ssh stop /etc/init.d/ssh restart

        6.配置开机启动:打开/etc/rc.local文件,在exit 0语句前加入:/etc/init.d/ssh start 

https://blog.csdn.net/xiao_yuanjl/article/details/79147314

好记性不如烂笔头,每天记录一点点
原文地址:https://www.cnblogs.com/wayneliu007/p/10324197.html