美文网首页
[Linux] SSH免密码登录

[Linux] SSH免密码登录

作者: AustinPup | 来源:发表于2019-01-09 10:41 被阅读0次

    引文

    安装ssh服务器

    sudo apt-get install openssh-server
    sudo yum install openssh-server

    确认是否启动
    ps -e|grep ssh
    如果未启动则调用
    启动: sudo/etc/init.d/ssh start
    重启: sudo /etc/init.d/sshresart

    root远程登录和端口修改

    /etc/ssh/sshd_config
    配置项

    Port 22333
    PermitRootLogin no
    

    免密码登录

    1.生成 SSH 密钥对,但不要用 sudo 或 root 用户。提示 “Enter passphrase” 时,直接回车,口令即为空:
    ssh-keygen

    2.把公钥拷贝到各 Ceph 节点,替换成前面的用户名
    ssh-copy-id {username}@node1

    相关文章

      网友评论

          本文标题:[Linux] SSH免密码登录

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