AWS Capistrano connection error

本小妞迷上赌 提交于 2020-01-03 02:22:10

问题


I am trying my first deployment of rails app using Capistrano to AWS.

I am stumped at the following error. apparently connection issue for my ssh, though i could see both my public and private key files are present at the following location /home/thanikkal/.ssh/config (got added wen i did ssh-add) can anyone tell why this error is? or suggest further trouble shooting steps?

  • executing `deploy:setup'

    • executing "mkdir -p /home/ubuntu/myapp /home/ubuntu/myapp/releases /home/ubuntu/myapp/shared /home/ubuntu/myapp/shared/system /home/ubuntu/myapp/shared/ log /home/ubuntu/myapp/shared/pids"

    servers: ["ec2-xx-xx-xxx-xx.compute-1.amazonaws.com"] connection failed for: ec2-xx-xx-xxx-xx.compute-1.amazonaws.com (Errno::EISDIR: Is a directory - /home/thanikkal/.ssh/config)


回答1:


Looks like you have conflicting credentials in your "/home/thanikkal/.ssh/config" You might want to remove and see if it works.

You also need to make sure the ssh key folder contains both public and private keys.




回答2:


You could try to deploy using your pem file.

Here are the instructions you should include into your deploy.rb file

default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:auth_methods] = "publickey"
ssh_options[:keys] = ["/path/to/your/pem/file/cert.pem"]


来源:https://stackoverflow.com/questions/7057047/aws-capistrano-connection-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!