Ask A Question

Notifications

You’re not receiving notifications from this thread.

SSH issue while deploying Rails application using Capistrano

Vaishnav Deore asked in Rails

I've been trying to deploy the rail application on Digitalocean droplet (ubuntu 22.04) using the following two tutorials
https://www.youtube.com/watch?v=xpYpaRUFzTI&t=945s&ab_channel=Deanin
https://gorails.com/deploy/ubuntu/22.04
But for some reason, I'm getting weird issue deploying using command cap production deploy
This is the error log
SSHKit::Runner::ExecuteError: Exception while executing as deploy@68.183.151.98: fingerprint SHA256:wRhnd217PeR12a4H6z74oca56P3qzBcsTVeiv6IFwjU is unknown for "68.183.151.98"
Caused by:
Net::SSH::HostKeyUnknown: fingerprint SHA256:wRhnd217PeR12a4H6z74oca56P3qzBcsTVeiv6IFwjU is unknown for "68.183.151.98"
Tasks: TOP => rbenv:validatedigitaloceanthe
(See full trace by running task with --trace)
For context, I can able to sign into the server manually using the command ssh deploy@68.183.151.98
ps: been stuck on this for a day now, Is anybody an expert in deploying and has faced similar issue please do help. I've tried ssh-keygen -R 68.183.151.58 on server but its still not working.

Reply

update your known hosts

check server ssh keys

double-check deploy user and permissions

check for typos

update gems and capistrano version

Reply

Hey man thanks this help me and updated my known hosts after restarting the server solved this issue

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,584+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.