Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
100 stars 28 forks source link

Unable to ssh to EC2 machine using pem key stored. #5081

Closed govind-neova closed 4 years ago

govind-neova commented 4 years ago

Description of your issue:

Is t

I am trying using build option in shippable.yml file

- export PUBLIC_SSH_KEY=$(shipctl get_integration_resource_field pem_cd_war_vm "Keys")
- echo $PUBLIC_SSH_KEY
- export PEM_KEY_PATH="/tmp/pem_key.pem"
- echo $PEM_KEY_PATH
- echo $PEM_CD_WAR_VM_KEYPATH
- cp $PEM_CD_WAR_VM_KEYPATH /tmp/pem_key.pem
- ssh -i  /tmp/pem_key.pem ubuntu@ip-address  

Unable to access the pem key file

trriplejay commented 4 years ago

I think you'll want to follow the instructions on this page: http://docs.shippable.com/ci/ssh-keys/ where it says "adding your own ssh key". Since you're using a CI type job, you'll need to include your key integration in the "integrations" section as shown on that docs page.

If you need to use the pemKey integration instead of an sshKey, you'll just have to change the 'type' in the yaml:

integrations:
  key:
    - integrationName: my_custom_key
      type: pemKey

once that is committed, you can see your key with the command ls /tmp/ssh

govind-neova commented 4 years ago

Thank you it worked for me.