Obviously that error can be caused a by a great deal of factors, but here is what happened to me and how I resolved it:
I was setting up pubkey access from my client to server and that worked after the newline issue. So now I needed to scp some openvpn certs to my client and no matter what I tried I would get
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
I tried to ssh other computer and the same result. After alot of trial and error (none of my google results worked) I finally figured out this setting in /etc/ssh/ssh_config
was the culprit. I had to comment that out, log into client once via password, then on server ssh-copy-id–>client. Then I uncommented the preferred auth and everything works as expected. Interestingly, I tried to copy and paste the public key into the client and that did not work, perhaps the newline issue…
Now onto finishing openvpn lol.