2 ssh tips or duhs
after struggling with ssh for a few days I finally figured out a couple of things that caused problems for me and I would like to spare others the grief.
1.) When you create an authorized_keys file, chmod it so that only user has write permissions. I know this is obvious, but depending on your umask when you create the file, it may not default to those permissions. (chmod 644 or 600)
2.) If you are copying and pasting a public key file into your authorized_keys file, i.e. id_rsa.pub or id_dsa.pub, make sure then entry is only 1 line. This public key should only be one super long line, not 2. It can wrap to 2 lines, but it is only one line.
If you used vi to copy and paste, you can enter :set nu yes to view line numbers. If you have more than one line number for the same key, you can use J to join the two together and then delete the space that is used to join the lines. Hope this helps someone.
|