0
I am trying to setup a passwordless authentication between my webserver & a reporting server using the below steps. It works fine in my dev environment , however in the customer environment it doesn't.
Steps :
As testUser user on web server :
mkdir ~/.ssh
cd ~/.ssh
ssh-keygen (use default file location and empty passphrase)
ssh-keygen -t dsa (as before)
Transfer the generated public keys to Reporting server.
As testUser user -
sftp testUser@<ReportServerName>
put id_dsa.pub
put id_rsa.pub
quit
Do the following steps on the Reporting server.
As testUser user
mkdir ~/.ssh
cd ~/.ssh
cat ~/id_rsa.pub >> authorized_keys
cat ~/id_dsa.pub >> authorized_keys2
rm ~/id_*.pub
chmod 644 auth*
As root user vi /etc/ssh/sshd_config
Uncomment ‘PubkeyAuthentication yes’
/etc/init.d/sshd restart
After doing these steps when I try to a sftp testUser@ it still asks me for a password.
Can someone help ?
Why are you putting one key in
authorized_keys
and the other inauthorized_keys2
? (The latter name has been abandoned many years ago.) Why do you have two keys in the first place? (Just one type is enough, usually rsa or ed25519.) – user1686 – 2016-07-07T10:55:41.583it should be
~/.ssh/authorized_keys
. Also what openssh version are you using? – Jakuje – 2016-07-07T11:38:40.860