sysdiglabs / kube-apparmor-manager

Manage AppAmormor profiles for Kubernetes cluster
Apache License 2.0
39 stars 5 forks source link

FATA[2022-01-06T04:06:46-08:00] failed to install AppArmor service: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain #3

Open Ghostwritten opened 2 years ago

Ghostwritten commented 2 years ago

export SSH_USERNAME=root export SSH_PASSPHRASE=123456 export SSH_PERM_FILE=/root/.ssh/id_rsa

$ kubectl apparmor-manager init I0106 04:06:46.144739 49894 k8s.go:77] Creating a CRD: apparmorprofiles.crd.security.sysdig.com FATA[2022-01-06T04:06:46-08:00] failed to install AppArmor service: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

why?

Kaizhe commented 2 years ago

Does your k8s worker node support SSH connection with private key?

amitpawarcbg commented 2 years ago

export SSH_USERNAME=root export SSH_PASSPHRASE=123456 export SSH_PERM_FILE=/root/.ssh/id_rsa

$ kubectl apparmor-manager init I0106 04:06:46.144739 49894 k8s.go:77] Creating a CRD: apparmorprofiles.crd.security.sysdig.com FATA[2022-01-06T04:06:46-08:00] failed to install AppArmor service: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

why?

you need to copy "/root/.ssh/id_rsa.pub" from Master node to "/root/.ssh/authorized_keys" on Master node. On Master node:

*$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys