Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ubuntu cluster utils.sh verify-ssh-prereqs #8559

@MCyprien

Description

@MCyprien

I'm trying to launch a kubernetes Cluster with ubuntu. I saw the docs must be updated #8373. During the process the verify-ssh-prereqs in utils.sh in ubuntu folder failed :

    Could not find or add an SSH identity.
    Please start ssh-agent, add your identity, and retry.

I changed the function by :

 local rc

  rc=0
  ssh-add -L 1> /dev/null 2> /dev/null || rc="$?"
  # "Could not open a connection to your authentication agent."
  if [[ "${rc}" -eq 2 ]]; then
    eval "$(ssh-agent)" > /dev/null
  fi

  rc=0
  ssh-add -L 1> /dev/null 2> /dev/null || rc="$?"
  # "The agent has no identities."
  if [[ "${rc}" -eq 1 ]]; then
    # Try adding one of the default identities, with or without passphrase.
    ssh-add || true
  fi

  # Expect at least one identity to be available.
  if ! ssh-add -L 1> /dev/null 2> /dev/null; then
    echo "Could not find or add an SSH identity."
    echo "Please start ssh-agent, add your identity, and retry."
    exit 1
  fi

a lot inspired by the vsphere utils.sh and now it works.

I think eval "$(ssh-agent)" > /dev/null must be added somewhere before ssh-add

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions