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
  • 相关阅读:
    UGO小组冲刺第一天
    day04_07-三个函数的区别
    day06_08 字符串
    day06_07 字典操作02
    day06_06 字典操作01
    day06_05 字典
    day06_04 购物车讲解02
    day06_03 购物车讲解01
    day06_02 元组
    day06_01 上节回顾
  • 原文地址:https://www.cnblogs.com/jiangfeilong/p/10373998.html
Copyright © 2011-2022 走看看