You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use SSHKit with a bracketed IPv6 address like so:
on['[1fff:0:a88:85a3::ac1f]']do |host|
But if I try to use an unbracketed IPv6 address
on['1fff:0:a88:85a3::ac1f']do |host|
I get the following error:
/Users/jerome/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing on host 1fff: getaddrinfo: nodename nor servname provided, or not known (SSHKit::Runner::ExecuteError)
Additional information
Ubracketed IPv6 addresses are valid IPv6 addresses, so I think SSHKit should be able to parse them.
In my particular case, I am encountering this issue when using Kamal. Supplying an unbracketed IPv6 address in the Kamal config/deploy.yml configuration doesn't work because Kamal then passes that IP to SSHKit, as explained in this open issue: basecamp/kamal#588. As mentioned in that issue, using brackets as a workaround doesn't work out of the box and requires further hacks overriding SSHKit's behavior, but these hacks all stem from SSHKit not properly parsing unbracketed IPv6 in the first place. Parsing unbracketed IPv6 addresses correctly in SSHKit would naturally solve those issues and allow Kamal to support unbracketed IPv6 addresses (and maybe bracketed too).
Problem
I can use SSHKit with a bracketed IPv6 address like so:
But if I try to use an unbracketed IPv6 address
I get the following error:
/Users/jerome/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing on host 1fff: getaddrinfo: nodename nor servname provided, or not known (SSHKit::Runner::ExecuteError)
Additional information
Ubracketed IPv6 addresses are valid IPv6 addresses, so I think SSHKit should be able to parse them.
In my particular case, I am encountering this issue when using Kamal. Supplying an unbracketed IPv6 address in the Kamal
config/deploy.yml
configuration doesn't work because Kamal then passes that IP to SSHKit, as explained in this open issue: basecamp/kamal#588. As mentioned in that issue, using brackets as a workaround doesn't work out of the box and requires further hacks overriding SSHKit's behavior, but these hacks all stem from SSHKit not properly parsing unbracketed IPv6 in the first place. Parsing unbracketed IPv6 addresses correctly in SSHKit would naturally solve those issues and allow Kamal to support unbracketed IPv6 addresses (and maybe bracketed too).Related issues
The text was updated successfully, but these errors were encountered: