#how to generate RSA key to use Public Authentication in SSH
ssh-keygen
ssh-keygen -b 4096
make this directory if it's not existing already
touch ~/.ssh/authorized_keys; chmod 700 ~/.ssh
copy the content of generated rsa located at .ssh/id_rsa.pub
nano ~/.ssh/authorized_keys
change the permission of directory
chmod 600 ~/.ssh/authorized_keys
- RSAAuthentication yes
- PubkeyAuthentication yes
- AuthorizedKeysFile %h/.ssh/authorized_keys
if you're using android device i suggest you use the connectbot app because it support publickey, you should import you rsa key via the app using mange pubkeys -> import -> id_rsa file