If you are working on a unix system (like the OP does), you can do something like:
Bold items must be replaced by actual values.
Original Message:
Sent: Aug 12, 2025 07:41 PM
From: kwg66
Subject: Connecting to esxi hosts with ssh without password
Hey BeginnerVM - glad you found the solution, i have had to manually copy the id into the authorized key file on esxi, the ssh-copy-id wasn't putting it there. Do you happen to have a solution for running an appropriate command to copy the id into the file? Manual copy and paste doesn't cut it no pun intended.
Original Message:
Sent: Sep 13, 2024 06:58 AM
From: beginnerVM
Subject: Connecting to esxi hosts with ssh without password
Hi Heinrich. I found the problem. The public key must be placed in the "authorized_keys" file. Instead, I copied the file containing the public key into the "/etc/ssh/keys-%u/authorized_keys" folder. Thank you for your help
Original Message:
Sent: Sep 12, 2024 11:18 AM
From: Heinrich_Rebehn
Subject: Connecting to esxi hosts with ssh without password
No sorting of any kind required!
You did change
"AuthorizedKeysFile" back to "/etc/ssh/keys-%u/authorized_keys" ? And restarted sshd or rebooted the server afterwards?
Other than that, I cannot offer you any more help, I am afraid. Google might be your friend!
-Heinrich
Original Message:
Sent: Sep 12, 2024 11:03 AM
From: beginnerVM
Subject: Connecting to esxi hosts with ssh without password
In fact I had already done the test by copying the public key in the folder you indicated to me. I remade it and it still doesn't work.Then I sorted the file keys alphabetically. Is this what you wanted to suggest to me?