Lab - SSL TSL Q#9 Pre-req DevOps Course

For : For the following question: Using the mykey SSH key-pair you created in previous question configure password less SSH connection between jump
host and app01 for user thor. (thor user should already be there on both servers).

I did the following:
ssh-copy-id -I ~ssh/mykey.pub thor@app01

ssh ‘thor@app01’
want to continue - yes
then asks for password?

Have I done the steps above correctly? If not pls provide exact commands
is there a password? if so what???

Hope to hear soon as waiting before can continue. thank you

@Tej-Singh-Rana
I tried your instructions,

thor@jump_host ~$ ls -l /home/thor/.ssh/ <=============
total 20
-r-------- 1 thor thor 1679 Feb 26 2021 id_rsa
-rw-r–r-- 1 thor thor 382 Feb 26 2021 id_rsa.pub
-rw-r–r-- 1 thor thor 181 Sep 21 04:35 known_hosts
-rw------- 1 root root 1679 Sep 21 04:34 mykey
-rw-r–r-- 1 root root 420 Sep 21 04:34 mykey.pub
thor@jump_host ~$ ssh-copy-id -i /home/thor/.ssh/mykey.pub thor@app01 <===========

/bin/ssh-copy-id: ERROR: failed to open ID file ‘/home/thor/.ssh/mykey’: Permission denied
(to install the contents of ‘/home/thor/.ssh/mykey.pub’ anyway, look at the -f option)
thor@jump_host ~$ sudo ssh-copy-id -i /home/thor/.ssh/mykey.pub thor@app01 <======
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/home/thor/.ssh/mykey.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
thor@app01’s password: <======== STILL ASKING FOR PASSWORD

Hi @shoaibshakilshaikh @fifafd350

it’s normal that when you try to copy the pub key to the target system he ask you the first time the password, because the pub key is not yet on the authorized_key on target system

When the ssh-copy-id command success, now you can ssh without password