[Solved:] Passwordless SSH not-working

SamJain
Jan 4, 2021

Lets see what how to set up passwordless SSH first

Consider 2 users possibly in 2 different servers.
usera and userb.

login to source server from where you wanna set up Passwordless SSH

su - usera
ssh-keygen -t rsa #not mandatory to pass keyphraase
ls ~/.ssh
cat id_rsa.pub

copy the content of the “id_rsa.pub” above to the destination server in the path, /home/userb/.ssh/authorized_keys

Now lets consider the other aspects to make the SSH work seamlessly

  1. Make sure below file allows PubkeyAuthentication to positive at least for the target user (userb in this case)
/etc/ssh/sshd_config

2. Make sure the below file has the entry for the user or the wildcard for all the user to allow the user to login

/etc/security/access.conf

Please do mention below in comment section, if you still see the issue

--

--

SamJain

Hi, I am Sampada Jain, a system and Cloud Technologies enthusiast. I find learning technologies easy and love to trouble-shoot errors. Passionate Linux learner.