zoukankan      html  css  js  c++  java
  • liunx centox ssh 配置

    https://www.cnblogs.com/xubing-613/p/6844564.html

    一. 查看是否安装了ssh: rpm -qa | grep ssh

    重启ssh  service sshd restart

    开启 sshservice sshd start

    二..

    修改/etc/ssh/sshd_config配置

    PermitRootLogin no //允许root 登录 no 则反之
    UsePAM no
    PasswordAuthentication no  //禁止远程用密码登录
    RSAAuthentication yes
    PubkeyAuthentication yes  // 启用公钥验证

    三.

    (3)修改文件夹以及文件的权限。

    #chmod 700 /home/Hadoop/.ssh

    #chmod 644 /home/Hadoop/.ssh/authorized_keys

    重启ssh   service sshd restart

    四.设置liunx系统的用户密码

    步骤:

    1: 登录服务器,切换到root用户,命令:sudo su
    2: 修改ssh配置文件,命令: vim /etc/ssh/sshd_config
    修改下面两个参数把no改为yes
    PermitRootLogin no
    PasswordAuthentication no
    3: 重启ssh服务使修改生效,
    debain命令:/etc/init.d/ssh restart
    centos命令:service sshd restart
    4: 给root账户添加密码,
    命令:passwd root
    输入命令后会让你设置密码,输入两次要设置的密码

    五.登陆
     由于root已被禁用,只能先用普通用户登陆,然后切换会root
  • 相关阅读:
    将一堆图片自适应页面排列
    用正则匹配富文本中的文本,并替换其内容
    实战
    从 defineProperty 到 Proxy
    CSS 实现蜂巢/六边形图集
    Umi 小白纪实(三)—— 震惊!路由竟然如此强大!
    无题
    贺文
    模型可解释性方法--lime
    多模态融合注记
  • 原文地址:https://www.cnblogs.com/jiangfeilong/p/10373998.html
Copyright © 2011-2022 走看看