Skip to content

Update Post Installation SSH Password Disable Steps - #1074

Open
alexfornuto wants to merge 4 commits into
harvester:mainfrom
alexfornuto:patch-1
Open

Update Post Installation SSH Password Disable Steps#1074
alexfornuto wants to merge 4 commits into
harvester:mainfrom
alexfornuto:patch-1

Conversation

@alexfornuto

Copy link
Copy Markdown

Problem:

The instructions for disabling SSH password auth were incorrect in a few different ways; there is no sshd_config file, kubectl isn't in the root user's path, etc etc...

Solution:

This is what worked for me, but I reckon someone at SUSE should perform a more holistic review of these pages.

Related Issue(s):

Issue harvester/harvester#11126

Test plan:

Do the steps, dawg.

Additional documentation or context

@alexfornuto alexfornuto changed the title Patch 1 Update Post Installation SSH Password Disable Steps Jul 9, 2026

```sh
cat <<EOF | kubectl apply -f -
cat <<EOF | sudo env "PATH=$PATH" /var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml apply -f -

@votdev votdev Jul 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply use sudo su to become root, then you can execute kubectl without issues.

Please keep the previous text.

Suggested change
cat <<EOF | sudo env "PATH=$PATH" /var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml apply -f -
cat <<EOF | kubectl apply -f -

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my testing, kubectl wasn't in the root user's PATH.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alexfornuto,
It should be in the root's PATH, see below:

# echo $PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/var/lib/rancher/rke2/bin
# ls /var/lib/rancher/rke2/bin
containerd  containerd-shim-runc-v2  crictl  ctr  kubectl  kubelet  runc

Could you give the result of your PATH environment variable with the following command?

echo $PATH

@alexfornuto alexfornuto Jul 26, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I can't, since I've already moved on from Harvester and have no more environments. I presume y'all have test environments to play with?

EDIT: Perhaps the issue wasn't with $PATH specifically. have you tried invoking kubectl as the rancher user with sudo?

@Vicente-Cheng Vicente-Cheng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm, just some nit

Comment thread versioned_docs/version-v1.8/install/post-install.md
Comment thread versioned_docs/version-v1.8/install/post-install.md Outdated
@Vicente-Cheng

Copy link
Copy Markdown
Contributor

hi @alexfornuto,
Could you check the above comment?

@alexfornuto
alexfornuto requested review from a team as code owners July 17, 2026 17:38
@alexfornuto

Copy link
Copy Markdown
Author

hi @alexfornuto, Could you check the above comment?

Comments reviewed, changes applied or comments addressed. Feel free to make additional changes required directly to the PR itself.

@Vicente-Cheng

Copy link
Copy Markdown
Contributor

hi @alexfornuto, Could you check the above comment?

Comments reviewed, changes applied or comments addressed. Feel free to make additional changes required directly to the PR itself.

Thanks @alexfornuto,
We're almost done. Please check the comment #1074 (comment)

The instructions for disabling SSH password auth were incorrect in a few different ways; there is no `sshd_config` file, `kubectl` isn't in the `root` user's path, etc etc...

This is what worked for me, but I reckon someone at SUSE should perform a more holistic review of these pages.

Signed-off-by: Alex Fornuto <2349184+alexfornuto@users.noreply.github.com>
Signed-off-by: Alex Fornuto <2349184+alexfornuto@users.noreply.github.com>
Signed-off-by: Alex Fornuto <2349184+alexfornuto@users.noreply.github.com>
Signed-off-by: Alex Fornuto <2349184+alexfornuto@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants