Here is a snippet from my YML file;
- step:
name: Statically serve via server-handler and expose it to the internet via ngrok
script:
- ssh $USER@$SERVER #'cd /var/www/skillshare-scp-test && npm install --save serve-handler ngrok && node index.js'
Here is the error I get through pipelines when I push my code:
1. + ssh $USER@$SERVER 'cd /var/www/skillshare-scp-test && npm install --save serve-handler ngrok && node index.js'
2. Warning: Permanently added the ED25519 host key for IP address 'x.xx.xx.xxx' to the list of known hosts
3. Permission denied (publickey)
Hey @Anthony Daly and welcome to the Community!
The error message indicates that the key is not being recognized as an authorized key by the destination server.
Could you please confirm if you have added the public key that was generated in Pipelines to the path ~/.ssh/authorized_keys on your server? This file should be in the home directory of the same user you are providing in the SSH command ($USER).
If you confirm the key was added in the correct file and user on your EC2 instance, I would suggest that you try to :
Additionally, you can also include the verbose flags in the SSH command so it will output more logs that may help with the troubleshooting:
ssh -Tvvv $USER@$SERVER 'cd /var/www/skillshare-scp-test && npm install --save serve-handler ngrok && node index.js'
Thank you, @Anthony Daly !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.