Unable to connect to 192.168.10.14:22 over ssh: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Hi fellows,
I am currently try to learn K3S what is very confusing to me.
So I installed a single node cluster on proxmox (1Master 4 agents all debian VM)

when I tried to install another node using k3sup like this

sudo k3sup join --ip 192.168.10.16 --user root --server-user root --server-ip 192.168.10.14 --server

I get: unable to connect to 192.168.10.14:22 over ssh: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

I set PermitRootLogin in sshd_conf on yes also TCP-Forwarding yes without success. What else could be the reason for that error?

Any help is appreciated

Uli

@uek67 Hi, I normally use ssh keys… So, on the system your running k3sup from (and you shouldn’t need sudo), the server 192.168.10.14? Can you ssh (as your user) to 192.168.10.16?

Hi malcomlewis,
sorry for my delayed answer I did the following I setup a new k3s-master node reinstalled all 4 agents with the new servers token and tried to conncet via ssh from the master-node to all agent-nodes (ssh-publickey) what worked fine and from any agent-node to the master-node what also worked (password)
master-node has 192.168.10.59 the agent-nodes

  • 192.168.10.14
  • 192.168.10.61
  • 192.168.10.63
  • 192.168.10.65

now kubectl get nodes only shows the master but no worker node and k3sup fails with the same error as before

k3sup install --ip 192.168.10.14 --user=root --cluster
Running: k3sup install
2024/08/13 13:59:57 192.168.10.14
Public IP: 192.168.10.14
Error: unable to connect to 192.168.10.14:22 over ssh: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
uli@K3s-master-node-1:~$ k3sup install --ip 192.168.10.59 --user=root --cluster
Running: k3sup install
2024/08/13 14:00:08 192.168.10.59
Public IP: 192.168.10.59
Error: unable to connect to 192.168.10.59:22 over ssh: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
uli@K3s-master-node-1:~$ k3sup install --ip 192.168.10.63 --user=root --cluster
Running: k3sup install
2024/08/13 14:00:27 192.168.10.63
Public IP: 192.168.10.63
Error: unable to connect to 192.168.10.63:22 over ssh: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

I currently have no more idea how to fix that.

Maybee you

Many Thanks in advance,

Uli

@uek67 Hi, either firewall issue, or on the workers sshd configuration, I’m on openSUSE and use;

cat /etc/ssh/sshd_config.d/01-ssd.conf

PermitRootLogin yes
PasswordAuthentication yes

Hi malcomlewis,

I am on a debian 12 machine and my sshd_config
looks like

Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
PasswordAuthentication yes
StrictModes yes
MaxAuthTries 6
MaxSessions 10

further TCO forwarding is activated and public-key-authentication instead of PasswordAuthentication I also tried no success.

Regards,

Uli

@uek67 and sysctl is forwarding ipv4 net.ipv4.ip_forward = 1

So from your master if you ssh -v <worker_ip> you can connect ok?

Hi malcomlewis,

right routing ipv4 is activates ssh -v user@ip-worker-node works fine reverse also.

Thanks in advance for your help.

Uli

with your setting ( using sudo and user=root), are you able to do passwordless ssh as root to root@master-node from the worker-nodes?

Problem solved it was the sshd_config Authentication section

On the Machine you want to install k3s via k3sup install --ip --user
root --cluster you must configure passwordless root Authentication like this:

Authentication
PasswordAuthentication no
PermitRootLogin without-password

then   systemctl restart ssh.service

On the Master node from where you rum k3sup install as root user (important) leave the sshd_config untouched!!!

Before editing the sshd_config file on the new master-node you have to ssh-copy your rsa ssh_key (ed25519 does not work) to the new Master node like eg ssh-copy-id root@ip-address
Thanks so much for all your help.

Uli

1 Like