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

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

 

Please login or register to post a comment.