thor@jump_host /$ sudo ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/home/thor/.ssh/id_rsa.pub”/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed – if you are prompted now it is to install the new keys [email protected]’s password:
Permission denied, please try again.
Now try logging into the machine, with: “ssh ‘[email protected]’”
and check to make sure that only the key(s) you wanted were added.
thor@jump_host /$ sudo ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/home/thor/.ssh/id_rsa.pub”
The authenticity of host ‘172.16.238.11 (172.16.238.11)’ can’t be established.
ECDSA key fingerprint is SHA256:xxB+skT5QFTyjTsf9vz0Ey39CKx+wyPsZrT0i2lBcv8.
ECDSA key fingerprint is MD5:7a:4a:d2:c8:46:c0:8d:68:1e:75:30:3b:73:51:ed:9e.
Are you sure you want to continue connecting (yes/no)? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed – if you are prompted now it is to install the new [email protected]’s password:
Number of key(s) added: 1
Now try logging into the machine, with: “ssh ‘[email protected]’”
and check to make sure that only the key(s) you wanted were added.
thor@jump_host /$ sudo ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/home/thor/.ssh/id_rsa.pub”
The authenticity of host ‘172.16.238.12 (172.16.238.12)’ can’t be established.
ECDSA key fingerprint is SHA256:RSDQpf7xEw1/lSO7X1hIueJsFix3zwzc0oL5bYpJ8t4.
ECDSA key fingerprint is MD5:94:4e:4f:30:99:5c:f9:62:35:10:ff:74:2f:95:a0:0e.
Are you sure you want to continue connecting (yes/no)? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed – if you are prompted now it is to install the new keys [email protected]’s password:
Number of key(s) added: 1
Now try logging into the machine, with: “ssh ‘[email protected]’”
and check to make sure that only the key(s) you wanted were added.
@Inderpreet I have made the same mistake, I have created the user thor as passwordless authentication user and my task get failed.
Request you to please update the task scenario with clear instruction so that it will be easy for us to give it a try and accomplish the task.
I have done all the things right but still my task fails.
Your ssh commands for example sudo ssh [email protected], its actually making ssh connection using user root from jump host since you used sudo. You should have tried without sudo so that you could test if user thor is able to ssh without any password.
We have to make it a password less authentication sudo user of app servers like tony for app server 1 steve for app server 2 so on. Not a thor user of app server 1. Hope you got it my point.
These expired/failed tasks will be be assigned to you sometime in future as you will be getting repetitive tasks sometime so you can definitely give it an another chance then.
@mmumshad could you please give me another chance on this, as I understood the task the same way as the other colleagues? As shown in the screenshot, I used the user thor that existed on the app servers.
Thanks!
@mihsan Question says thor on jump host to all app servers through their respective sudo users for example tony for app server 1. So if task is about to setup SSH between jump host and app server 1, it should be from user thor (on jump host) to user tony on app server 1.
Reference or one of the approach to this question - Linux SSH Authentication ( Passwordless SSH ) can be as follows -
Login to all the app servers and create authorized_keys file in specific users .ssh home directory as shown below -
touch ~/.ssh/authorized_keys
Change the permission of file to 600
Now on jump_host generate the keys using command - ssh-keygen -t rsa
Note - Just press enter for every question asked.
Finally scp the ~/.ssh/id_rsa.pub from jump_host to all the app servers as shown below using respective passwords.
Example - scp ~/.ssh/id_rsa.pub tony@stapp01:/home/tony/.ssh/authorized_keys
With above steps , you will be able to set the passwordless ssh from jump_host server for user thor to all the stapp server respective users.
I was able to complete this task, but I agree with you … this questions is not so clear.
This is not the only ambiguous question I saw … Think the program admins should formulate clear questions.
Hello, @anauecuri
In the task, they mentioned about passwordless SSH access to all app servers through their respective sudo users. I believe all app server sudo user is tony, steve and banner. What is the confusion part?