After reading the entire contents of google I stumbled across this
snippet of code which I ran and it fixed my problem.

So here it is for other people who may hit the same problem:

require 'rubygems'
require 'net/ssh'
include Net
domain = 'your_server_domain_as_in_deploy.rb' # insert IP address or
domain name here
begin
Net::SSH.start(domain, 'your_deploy_user_as_in_deploy.rb') do |ssh|
# ...
end
rescue Net::SSH::HostKeyMismatch => e
puts "remembering new key: #{e.fingerprint}"
e.remember_host!
retry
end

Cheers
George

PS. It would be great if Capistrano could give you the message about
server key changing the same as putty etc....

On Jun 29, 3:59 pm, giorgio <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have seen previous posts about this key mismatch problem but I am
> still getting it.
>
> I am trying to do a cap deploy:setup
>
> I have had it working on other apps for some time.
>
> I upgraded ssh on the box I am deploying to ubuntu 7.1
>
> I had to regenerate the server keys as they were blacklisted due to
> ssh defects in Debian systems.
>
> After that I connected from Win XP laptop using putty and got the
> dialog asking me if I wanted to except the different key. I said yes
> and it was fine.
>
> Likewise for WinScp.
>
> But with Capistrano I get:
> connection failed for: george-ubuntu (Net::SSH::HostKeyMismatch:
> fingerprint 05:80:21:fe:d1:66:00:b2:80:79:c9:4f:ff:04:7
> 8:56 does not match for "george-ubuntu,192.168.2.4")
>
> I have tried ssh_options[:paranoid] = false but then I get prompted
> for a password rather than using the key.
>
> Where is Capostrano getting the old server key from?
> Presumably if I new that I could clear the old key...
>
> Thanks for any help.. I cant deploy anything with Capistrano now!
>
> George
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to