Capistrano: Authentication failed for user ubuntu@xx.xxx.xxx.xxx (Net::SSH::AuthenticationFailed) – Wasya Co
Published

The cool dr.calix writes:

issue: Authentication failed for user ubuntu@xx.xxx.xxx.xxx (Net::SSH::AuthenticationFailed) via capistrano but can ssh directly

debugging:

  • sudo tail -f /var/log/auth.log on the server
  • then tried cap production deploy:check on my local
  • userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth] appeared from auth.log

solution:

  • edited then /etc/ssh/sshd_config
    • find PubkeyAuthentication then uncomment(remove #)
    • add PubkeyAcceptedKeyTypes=+ssh-rsa
  • restart sshd sudo systemctl restart sshd

 

By Victor Pudeyev

A technical lead and business developer residing in Austin, TX. I specialize in systems built with ruby, javascript and solidity.


0 comments

Leave a Reply