sysdiglabs/kube-apparmor-manager

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

Ghostwritten opened this issue · 2 comments

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?

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

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