zoukankan      html  css  js  c++  java
  • ssh免密码登陆设置

    服务器端

    CentOS 6.5下编辑/etc/ssh/sshd_config

    MacOSx下编辑/etc/sshd_config

    #开启公钥验证
    RSAAuthentication yes
    PubkeyAuthentication yes
    AuthorizedKeysFile .ssh/authorized_keys
    #关闭密码验证
    PasswordAuthentication no

    然后重启sshd服务

    PS.CentOS下完成以上步骤以后若出现拒绝访问的情况,还需要修改SELinux设置或直接关闭SELinux(修改 /etc/selinux/config,置SELINUX=disabled,重启电脑)

    客户端

    ssh-keygen -t rsa -P ''

    然后将客户端~/.ssh/id_rsa.pub文件复制到服务器上,然后在服务器上进行如下操作

    cat id_rsa.pub >> ~/.ssh/authorized_keys
  • 相关阅读:
    SRM482
    SRM481
    SRM480
    SRM479
    SRM478
    vue-cli 3 is not a modual err
    .vimrc
    css3 导入字体
    class []的用法
    RK61 Keyboard Use
  • 原文地址:https://www.cnblogs.com/flowjacky/p/4439371.html
Copyright © 2011-2022 走看看