0

From my rails application, when I tried to dowload a file from one our Window Server using gem 'net-scp'.(The rails application is running on ubuntu 18)

Net::SCP.start(ENV["IP_ADDRESSS"], ENV["USER_NAME"], :password => ENV["PASSWORD"]) do |scp|
      scp.download(ENV["75_SERVER_PATH"], Rails.root.join('public/output_json.json').to_s)
    end

But the server is not allowing us to access the file and I getting the follwing issue,

Net::SSH::HostKeyMismatch (fingerprint c8:81:b6:00:a7:55:eb:09:d5:8e:f6:3b:ee:47:7b:5f does not match for "Server IP")
SethuNagaKarthik
  • 387
  • 1
  • 3
  • 17
  • You can call [remember_host!](https://net-ssh.github.io/ssh/v2/api/classes/Net/SSH/HostKeyMismatch.html#M000305) and retry to bypass the exception. Would not recommend in production but it might help you troubleshoot. [`ssh-keygen -R ENV["IP_ADDRESSS"]`](https://stackoverflow.com/a/21795390/5399937) seems to have worked in the past. – Tom Feb 28 '19 at 06:39
  • @Tom it is working perfectly thanks – SethuNagaKarthik Feb 28 '19 at 12:07

0 Answers0