I'm trying to setup an SSH passwordless login but can't seem to get it to work...here is what I did:

Host: (OpenSSH_5.3p1, OpenSSL 1.0.0-fips)

1.) ssh-keygen -t dsa

2.) copied the id_dsa.pub to the remote server OpenSSH_6.2p2 (CentrifyDC build 5.1.3-204) (CentrifyDC build 5.1.3-204), OpenSSL 0.9.8zc-fips

3.) ran cat id_dsa.pub >> authorized_keys and cat id_dsa.pub >> authorized_keys2 on the remote server


1.) chmod 700 on the .ssh dir

2.) chmod 700 on both authorized_keys and authorized_key2

what am I missing here?

  • 1
    Why don't you try looking at the error messages? The way to do it is to start ssh by hand on the server, service ssh stop && /usr/sbin/sshd -Dd (if you are using Debian), then trying to connect and seeing what happens. Otherwise, look into /var/log/auth.log or whatever your distro has. You can also do it with cd /var/log && grep -nrI ssh. – MariusMatutiae Oct 23 '15 at 20:02
  • well, i've always just done ssh-keygen and generated the rsa file.. But A)I notice your path for authorized_keys is wrong, and id_rsa.pub is meant to be on the local computer while the authorized_keys file you're appending to is on the remote server. Also this isn't a problem but it's senseless to have a 7 permission on something that is a data file file. Can do chmod 600 id_rsa (local). chmod 644 id_rsa.pub (local and remote) chmod 600 authorized_keys Some ideas re chmod permissions here sshkeychain.sourceforge.net/mirrors/SSH-with-Keys-HOWTO/… – barlop Oct 23 '15 at 21:30
  • also check sshd_config has something along the lines of PubkeyAuthentication yes. And your path to authorized_keys on the remote host.. should be like ~/.ssh/authorized_keys You can use ssh-copy-id see superuser.com/questions/959671/… – barlop Oct 23 '15 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.