Check the image below and advice please,
being able to ssh using user thor is important. From the screenshot I can see that you were doing ssh <user>@<server> from root user on the jumphost.
I’m still learning linux commands and cannot figure out what I did wrong. I can see user is thor@jumphost and I was able to login with same command that the Kodekloud tried and showed in the error. Can yo help me with this?
I suppose you are talking about 100 Days of DevOps: Day 7 task.
I see that you were able to app server1 using ssh tony@stapp01. Not sure why it failed, can you explain what steps have you taken?
How I would do is(not the only way to do it):
- create a ssh key-pair for
thoruser on jumphost. - copy and paste the
.pubkey into the/home/<app_server_user>/.ssh/authorized_keysfile on all app servers.
you can copy that public key either manually or by using ssh-copy-id
Yes, this is regarding 100 Days of DevOps: Day 7 task.
I created the SSH key pair on jumphost for all 3 appservers as Appserver-SSH1, Appserver-SSH2 and Appserver-SSH3 and moved them to
~/.ssh/directory.
Then usedssh-copy-idto copy each public key to their respective app server.
I then usedssh-addto add all 3 private keys to ssh agent.
These were the steps I followed after which I was able to login to app server using ssh tony@stapp01 from jumphost using thor user.
I think you don’t need to create 3 ssh key pairs in jump host. Instead create a one key pair using ssh-keygen and then copy the public key to all three servers using ssh-copy-id tony@stapp01 etc. Do these in thor user account. Do not switch to the root user.
Thanks Vidusha, It passed the check now when I only created one key pair for all 3 app servers.

