Open fahu opened 1 year ago
@fahu Have you added your public key to the authorized_keys
file on your remotes host(s)? AFAIK kamal does not support any way of configuring ssh on your hosts. You need to have them configured to accept ssh connections before running kamal setup
@fahu Have you added your public key to the
authorized_keys
file on your remotes host(s)?
Yes, I can ssh to the remote server.
And you set an empty passphrase for the key during keygen?
No I didn't. Is it not possible to connect with key's that have a password?
As I'm even asked for the password I would not expect this to be the problem 🤔
I kinda have the same issue.
New setup:
servers:
- 161.xx.xx.xxx (digital ocean server, I can ssh manually on the server)
Using the alias on Ubuntu 22.04:
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 /var/run/docker.sock:/var/run/docker.sock ghcr.io/basecamp/kamal:latest"
A kamal setup -v
command exits with this error:
INFO [5f5256e6] Running /usr/bin/env mkdir -p .kamal on 161.xx.xx.xx
DEBUG [5f5256e6] Command: /usr/bin/env mkdir -p .kamal
Finished all in 0.3 seconds
ERROR (Net::SSH::AuthenticationFailed): Exception while executing on host 161.xx.xx.xx: Authentication failed for user root@161.xx.xx.xx
/usr/local/bundle/gems/net-ssh-7.2.0/lib/net/ssh.rb:273:in `start'
/usr/local/bundle/gems/kamal-1.0.0/lib/kamal/sshkit_with_ext.rb:95:in `block in start_with_concurrency_limit'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb:31:in `acquire'
/usr/local/bundle/gems/kamal-1.0.0/lib/kamal/sshkit_with_ext.rb:94:in `start_with_concurrency_limit'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/connection_pool.rb:63:in `call'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/connection_pool.rb:63:in `with'
/usr/local/bundle/gems/kamal-1.0.0/lib/kamal/sshkit_with_ext.rb:83:in `with_ssh'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/netssh.rb:130:in `execute_command'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute'
<internal:kernel>:90:in `tap'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/abstract.rb:80:in `execute'
/usr/local/bundle/gems/kamal-1.0.0/lib/kamal/cli/base.rb:175:in `block in ensure_run_directory'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/backends/abstract.rb:31:in `run'
/usr/local/bundle/gems/sshkit-1.21.4/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
I tried the various "eval ssh-agent" tricks found here and there, none of them worked for now.
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 /var/run/docker.sock:/var/run/docker.sock ghcr.io/basecamp/kamal:latest"
I had various SSH issues while trying to run kamal using the docker alias e.g.
I switchted to using the gem and haven't had issues since then
I got the dockerized kamal to work by passing the ssh config as shown in this issue: https://github.com/basecamp/kamal/issues/218#issuecomment-2083590982
I'm trying to run
kamal setup
. If I try to configure an SSH key of typeECDSA
(generated withssh-keygen -t ecdsa -b 521 -C "fabian@x.com"
) I get the following error:Any idea on how I can solve this?