I have followed countless tutorials about how to do this, some of them were the same, some of them were different, didn't matter, because none of them worked in my case, so I'm kind of desperate already.
What I've done (and works for everyone in each tutorial, except for me):
- Generated a key using PUTTY Key Generator on my workstation.
- Saved private key on my workstation.
- Created a folder
.sshin my home directory and gave
chmod 700permissions to it on the server.
- Created a file
.sshfolder and gave
chmod 600permissions to it on the server.
- Inside the
authorized_keysfile, I copied in the key that the PUTTY key generator had in a single line for OpenSSH on the server.
- Uncommented the line
AuthorizedKeysFilein the file
/etc/ssh/sshd_configso it would point to my file containing the key on the server.
- Tried to connect to the server using PUTTY and the previously saved private key file. but I get a
server refused our keyeverytime, no matter what I do.
For the record, I'm trying to connect to the server using a tunnel/channel etc. that Ngrok created for exposing my server to the internet.
What am I doing wrong?