Skip to content

How to SSH into a server using Kamal? ERROR (Net::SSH::AuthenticationFailed): Exception while executing on host 111.111.111.11: Authentication failed for user user@111.111.111.11 #894

Closed Answered by csalmeida
csalmeida asked this question in Q&A
Discussion options

You must be logged in to vote

Changing the volume path for the SSH folder in the Docker command allowed Kamal to SSH into the server:

alias kamal='docker run -it --rm -v "${PWD}:/workdir" -v "${HOME}/.ssh:/root/.ssh" -v "/run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock" -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/basecamp/kamal:latest'

Output:

kamal setup
  INFO [f932c1af] Running /usr/bin/env mkdir -p .kamal on 111.111.111.11
  INFO [f932c1af] Finished in 1.062 seconds with exit status 0 (successful).
  INFO [8d6509a9] Running /usr/bin/env mkdir -p .kamal/locks on 111.111.111.11
  INFO [8d6509a9] Finished in 0.051 seconds with exit status 0…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by csalmeida
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant