美文网首页
Ubuntu开启SSH

Ubuntu开启SSH

作者: ZHOUZAIHUI | 来源:发表于2018-04-27 21:58 被阅读0次

    1 安装SSH Server

    sudo  apt install openssh-server
    

    2 检查ssh服务开启状态

    ps -s | grep ssh
    

    3 启动ssh服务

    service ssh start
    /etc/init.d/ssh start
    

    4 配置openssh-server

    openssh-server配置文件位于/etc/ssh/sshd_config,在这里可以配置SSH的服务端口等,例如:默认端口是22,可以自定义为其他端口号,如222,然后需要重启SSH服务。

    5 Ubuntu中配置openssh-server开机自动启动

    打开/etc/rc.local文件,在exit 0语句前加入

    /etc/init.d/ssh start

    参考文献:
    https://blog.csdn.net/md521/article/details/52597398

    相关文章

      网友评论

          本文标题:Ubuntu开启SSH

          本文链接:https://www.haomeiwen.com/subject/iuailftx.html