So I powered the machine on and accessed it directly into VMware, created a .ssh dir under ~, which received the permission 700. (drwx------).
Then I opened Windows CMD on the host machine, executed ssh-keygen to generate the key pair:
First I made sure I was the sole owner of the C:\users\me\.ssh folder; I read it could cause problems if more entities had permission to read/write/execute on that folder.C:\Users\me\.ssh\id_rsa
C:\Users\me\.ssh\id_rsa.pub
Afterwards, I opened the public key (C:\Users\me\.ssh\id_rsa.pub) with a text editor and copied its contents, then, back at the console, I logged in the virtual machine again.
Next, I created the ~/.ssh/autorized_keys file, edited and pasted the contents stored on the clipboard (the key C:\Users\me\.ssh\id_rsa.pub). Chmoded ~/.ssh/autorized_keys to 600.
After that I proceeded to editing the /etc/ssh/sshd_config file, changing the following:
Code: Select all
PubkeyAuthentication yes
PasswordAuthentication no
Still, it keeps asking for my password.
I visited this page and performed the final step:
Code: Select all
restorecon -Rv ~/.ssh
p.s. this is my kernel info: Linux me 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux