zoukankan      html  css  js  c++  java
  • Centos7--ssh配置及随机启动 ( linux 系统安装 <二>)

    目录

    1. ssh配置及随机启动

    2. 讲解使用中遇到的问题

    一、 ssh配置及随机启动

    1. 找到了  /etc/ssh/  目录下的sshd服务配置文件 sshd_config,用Vim编辑器打开

    将文件中,关于监听端口、监听地址前的 # 号去除。

    2、设置开机启动  

    systemctl enable sshd
    

      或者  [root@localhost ~]# vi /etc/rc.local  加入:service sshd start 或  /etc/init.d/sshd start

    3. 启动:   

    systemctl start sshd
    

    4. 查看启动状态:  

     systemctl status  sshd
    

      看到  Active: active (running) 即使 运行当中。

    5. 看下这个ssh服务的网络连接情况:

    netstat -ntlp
    

      如果看到如下内容:

      tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN 

      这说明sshd已经能够正常工作了

    6. 查看ssh服务有没有运行,如果有,可以看到类似以下内容:

    ps -ef | grep ssh

    root 2659 1 0 18:31 ? 00:00:00 /usr/sbin/sshd

    root 2702 2618 0 18:38 pts/0 00:00:00 grep ssh

    二、关闭防火墙

    1. 查看防火墙状态

    systemctl status firewalld.service
    

    2. 停止firewall

    systemctl stop firewalld.service
    

    3. 禁止firewall开机启动

    systemctl disable firewalld.service 
    

     

  • 相关阅读:
    Linux下安装python
    oracle 12c使用问题总结
    oracle下载地址
    Informatica PowerCenter下载地址
    主流ETL工具
    【phonegap】下载文件
    eclipse显示包的层次关系
    UltraISO 9.6.5.3237
    Windows操作系统设置代理
    wireshark常用的过滤命令
  • 原文地址:https://www.cnblogs.com/mobaids/p/8598540.html
Copyright © 2011-2022 走看看