问题
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