美文网首页
rke添加节点失败

rke添加节点失败

作者: 开始懂了90 | 来源:发表于2022-10-11 09:36 被阅读0次

    rke up 添加节点失败,报错如下:

    WARN[0000] Failed to set up SSH tunneling for host [192.168.120.24]: Can't retrieve Docker Info: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info: Unable to access node with address [192.168.120.24:22] using SSH. Please check if you are able to SSH to the node using the specified SSH Private Key and if you have configured the correct SSH username. Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain 
    WARN[0000] Removing host [192.168.120.24] from node lists 
    

    192.168.120.24 message 错误日志

    [root@prd20-rancher-node-24 ~]# tailf /var/log/messages
    Oct 10 16:53:39 prd20-rancher-node-24 sshd[11619]: Connection closed by authenticating user rancher 192.168.120.2 port 34546 [preauth]
    

    原因:
    openssh 版本过高导致
    正常版本(openssh升级前):OpenSSH_8.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
    异常版本(openssh升级后):OpenSSH_9.0p1, OpenSSL 1.0.2k-fips 26 Jan 2017

    背景

    1. 已配置rke到node节点的rancher to rancher 免密登录
    2. rke节点: ssh rancher@192.168.120.24 可以正常登录
    3. 免密登录都正常,并且也都能执行docker命令。

    解决办法一: 修改配置

    `/etc/ssh/sshd_config`
    
    `### [https://bbs.archlinux.org/viewtopic.php?pid=1995313](https://bbs.archlinux.org/viewtopic.php?pid=1995313)`
    
    `#PubkeyAuthentication yes`
    
    `PubkeyAcceptedKeyTypes=+``ssh``-rsa`
    
    

    解决办法二: 降低ssh版本

    mv /etc/ssh /etc/ssh-$(date +%F)
    cp /etc/pam.d/system-auth /etc/pam.d/system-auth-$(date +%F)
    cp /etc/pam.d/sshd /etc/pam.d/sshd-$(date +%F)
    rpm -qa | grep openssh > openssh.txt
    for i in $(cat openssh.txt);do rpm -e $i --nodeps;done
    tar xf openssh-7.4p1.tar.gz
    cd openssh-7.4p1/
    ./configure --prefix=/usr --sysconfdir=/etc/ssh && make && make install
    cp contrib/redhat/sshd.init /etc/init.d/sshd
    chkconfig --add sshd
    chkconfig sshd on
    systemctl restart sshd
    

    相关文章

      网友评论

          本文标题:rke添加节点失败

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