I set up a project to SCP my build folder by using SSH keys generated by bitbucket. This is a success and working fine.
I set up another project to do the same in the same server but a different folder. But I got the following error:
<span>INFO: Starting SCP deployment <br>to xxx.xxx.xxx.x:/build/html...<br></span><span>scp -rp -i /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp build/asset-manifest.json build/css build/favicon.ico build/fonts build/images build/index.html build/js build/manifest.json build/precache-manifest.12de38d8917aee10a073b8a1dbac3fd1.js build/robots.txt build/scss build/service-worker.js build/static <a href="mailto:ec2-user@13.237.54.159" target="_blank" rel="noopener nofollow noreferrer">user@xxx.xxx.xxx.x</a>:/build/html<br></span><span><a href="mailto:ec2-user@13.237.54.159" target="_blank" rel="noopener nofollow noreferrer">user@xxx.xxx.xxx.x</a>: Permission denied (publickey).<br></span><span>lost connection<br></span><span>✖ Deployment failed.</span><span>DEBUG: Using default ssh key</span>
Both projects are using bitbucket generated SSH keys. Both are different. Please help me figure out the issue.