Mirantis / launchpad

Other
28 stars 45 forks source link

launchpad apply - ssh: handshake failed #30

Closed mesmacosta closed 4 years ago

mesmacosta commented 4 years ago

Trying to follow the https://github.com/Mirantis/launchpad/blob/master/docs/getting-started.md.

Given I have 3 Virtual Machines:

  1. xx.xx.xxx.xx4 Where I run the. launchpad
  2. xx.xx.xxx.xx5 is the manager node
  3. xxx.xxx.xxx.xx8 is the worker node

When running the command: ./launchpad --debug apply

This is my config file:

DEBU[0000] tracking analytics event 'Cluster Apply Started' 
DEBU[0000] opened config file from /home/my_user/cluster.yaml 
DEBU[0000] loaded configuration:
apiVersion: launchpad.mirantis.com/v1beta2
kind: UCP
metadata:
  name: ucp-kube
spec:
  hosts:
  - address: xx.xx.xxx.xx5
    role: manager
    privateInterface: eth0
    engineConfig: {}
    ssh:
      user: my_user
      port: 22
      keyPath: /home/my_user/.ssh/google_compute_engine
  - address: xxx.xxx.xxx.xx8
    role: worker
    privateInterface: eth0
    engineConfig: {}
    ssh:
      user: my_user
      port: 22
      keyPath: /home/my_user/.ssh/google_compute_engine
  ucp:
    version: 3.3.1
    imageRepo: docker.io/docker
    installFlags: [--admin-username=admin, --admin-password=passw0rd!, --default-node-orchestrator=kubernetes]
  engine:
    version: 19.03.8
    repoURL: https://repos.mirantis.com
    installURLLinux: https://get.mirantis.com/
    installURLWindows: https://get.mirantis.com/install.ps1
    channel: stable

Then I get the error message:

INFO[0000] xxx.xxx.xxx.xx8: opening SSH connection      
DEBU[0000] using SSH auth sock /tmp/ssh-0VrK4rzCq1/agent.4744 
ERRO[0000] xxx.xxx.xxx.xx8: failed to connect -> ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain 
ERRO[0000] xx.xx.xxx.xx5: failed to connect -> ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain 
INFO[0000] xxx.xxx.xxx.xx8: opening SSH connection      
DEBU[0000] using SSH auth sock /tmp/ssh-0VrK4rzCq1/agent.4744 
ERRO[0000] 1xxx.xxx.xxx.xx8: failed to connect -> ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain 
INFO[0000] xx.xx.xxx.xx5: opening SSH connection        
DEBU[0000] using SSH auth sock /tmp/ssh-0VrK4rzCq1/agent.4744 
ERRO[0000] xx.xx.xxx.xx5: failed to connect -> ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain 

Doing ssh my_user@xx.xx.xxx.xx5 ssh my_user@xxx.xxx.xxx.xx8

Work, so the ssh keys are correctly set up. Is there something I'm missing? The ssh connection opened by the GO client needs any additional config?

mesmacosta commented 4 years ago

Was able to fix this, I disabled project level ssh access on both the worker and manager VM's.

Then I created a .pem RSA key, and used it on the ssh keyPath. Also make sure the user you are using to ssh, has passwordless sudo access on worker and manager VM's.

james-nesbitt commented 4 years ago

@mesmacosta it looks like you posted a workaround, but probably this SSH identification should be done automatically.