-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Authentication failed for user #218
Comments
I'm also experiencing this trying to use GitHub Actions. I'm able to run |
Same problem |
Same problem here |
I'm experiencing the same problem. I've installed the correct key into my ssh-agent. I'm able to login normally myself but mrsk fails to do so.
I took a look at the server I was logging into and noticed it was failing multiple times on that attempt. For my case, it was trying several other keys first before getting to the valid key on my system. This got me back up and running.
|
Checkout this post, it was what solved it for me! |
Hey guys, could you take a look at this similar problem? Maybe you will have some ideas: #383 |
This is not for merging, but to test whether the IdentityFile is read automatically from ~/.ssh/config. See #218
This is not for merging, but to test whether the IdentityFile is read from ~/.ssh/config. See #218
This is not for merging, but to test whether the IdentityFile is read from ~/.ssh/config. See #218
@iamFIREcracker - net-ssh reads the IdentityFile setting and #384 shows that working in the integration tests. I've raised #386 which will allow the log level to be set in net-ssh. Could you try that branch, set the log level to debug and see if there's anything useful in the output? @freddyheppell, @luvs, @veeti-k - were you having the exact same issue with the IdentityFile setting as @iamFIREcracker? In any case could you also that branch to get some debug information? |
I had the same problem while having ssh key with name different than |
My issue was that I have a lot of keys added to the agent and they exhausted the The drawback is that this way it doesn't use the SSH agent and always asks for the key's password. |
For what it's worth, it's now working for my use case (using tailscale's ssh auth). Unfortunately I jumped a few versions of mrsk into Kamal, plus some Tailscale updates, so I'm not sure exactly what changed to make it now work. |
if you use kamal with alias, u execute a container and you don't have your .ssh. Add -v <home_path>/.ssh:/root/.ssh at alias like: |
I'm going to close this one for now - there's no concrete report here of a Kamal bug and any debugging needs to be done by the reporters. For anyone with an authentication problem who finds this issue, you should add this to your Kamal config and see if that helps figure it out:
If you figure out the issue, do post the fix here (unless someone has already reported the same fix). We can use that to document possible causes. If it points to a Kamal bug, then please raise a new issue. |
here's a little improved version of @gioggi 's solution, which interpolates the current home dir. it really works. alias kamal='docker run -it --rm -v "${PWD}:/workdir" -v "/run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock" -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" -v "$HOME/.ssh:/root/.ssh" -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/basecamp/kamal:latest' someone could put a PR updating the docs 👀 |
…acOS As per this issue here: basecamp/kamal#218 This exposes the hidden `.ssh` directory to the docker container. Solved by @gioggi and @stewones. I spent at least 1 hour banging my head wondering why my ssh auth wasn't working. I forgot I was using a Docker container and it wasn't exposing my Mac's SSH keys, I found the linked GitHub issue that made me aware of the issue.
@stewones @gioggi you guys are absolute legends, thanks for your help. I was banging my head against the computer for an hour until you reminded I was running Kamal in a docker container. I raised a pull request in the documentation with @stewones solution: basecamp/kamal-site#133 |
It seems like the underlying SSH client is not properly sourcing ~/.ssh/config.
I installed the key on the host:
Added a new entry to ~/.ssh/config:
Confirmed access in the shell:
Hoever, when I run
mrsk
, it outputs the following error message:Could it be trying to use a differnt key? Let's find out.
I tried running
ssh-copy-id
again, without specifying the identity file to copy, and it tried to install a different entry:Unfortunately even with this key installed,
mrsk
was still unable to connect to the host.Last thing I tried was removing that host entry from the ~/.ssh/config, and that's when things finally started to work.
What's going on? Anybody bumped into this? It seems like the underlying SSH client is indeed capable of sourcing ~/.ssh/config; however, it's failing to use the configured identity key.
The text was updated successfully, but these errors were encountered: