This question was asked before a few times and I tried all the proposed solutions to generate a passwordless key, but to no avail. May be something different needs to be done as when doing this on Ubuntu from VM Fusion?
hadoop@ubuntu:~$ start-dfs.shStarting namenodes on [localhost]localhost: hadoop@localhost: Permission denied (publickey,password).Starting datanodeslocalhost: hadoop@localhost: Permission denied (publickey,password).Starting secondary namenodes [ubuntu]ubuntu: hadoop@ubuntu: Permission denied (publickey,password).2021-06-21 22:05:49,215 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable