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
/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
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