Ssh passwordless authentication

I don’t understand how I failed this task, I setup up passwordless authentication by adding thor public key on all app servers in the /home/thor/.ssh/authorized_keys directory and made sure thor could ssh directly to them without password via
ssh 172.16.238.10 or ssh [email protected]

how did it fail?

i did all the steps and able to ssh (password less) but dint know why i failed.

You should have provided access to all users, not just thor.

1 Like

@nenadmiladin
I don’t think the task description was clear on that … anyway could you explain how to do that?

Hello,

In this task it is asked to configure password-less SSH access for thor user (on jump host) to all app server through their respective sudo users (for example tony for stapp01). I hope it clears why this task was marked as failed for you guys.

@Inderpreet I don’t understand the question, I guess.

I enabled thor to have passwordless ssh access from jump to stapp01, stapp02, and stapp03.
I enabled tony to passwordless ssh from jump to stapp01.
I enabled steve to passwordless ssh from jump to stapp02.
I enabled banner to passwordless ssh from jump to stapp03.

Were we supposed to give thor the ability to passwordless ssh in as users:

  • tony to stapp01?
  • steve to stapp02?
  • banner to stapp03?

My error seen was:
user has no passwordless on App Server 1
user has no passwordless on App Server 2
user has no passwordless on App Server 3

in app1 server you knew who is sudo user there tony, same app2 steve, app3 banner as same in jump_host thor. So you have to configure ssh passwordless authentication to those user. Not to a create user in jump host. Hope it’s help you.

1 Like

Thank you Player1,
I appreciate the reply.

I was able to successfully complete the task but I have doubt about the efficiency of the task.

when I copied the ssh key to app servers I had to use their respective users ( tony, banner etc) and hence the key got copied to the app user’s home folder and I had to change permissions and copy files to thor’s directory .

was there any other better option to do : like was there a way to use ssh-copy-id with thor’s credentials to app server ?