Closed
Description
I want to test a remote host via ipv6 address and i got the following output:
inspec shell -t ssh://pmuench@2000:111b:ffe2:1:0:0:0:2 --port 545 --key-files /home/user/.ssh/id_rsa
/usr/lib/ruby/2.3.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): ssh://pmuench@2000:111b:ffe2:1:0:0:0:2 (URI::InvalidURIError)
from /usr/lib/ruby/2.3.0/uri/rfc3986_parser.rb:73:in `parse'
from /usr/lib/ruby/2.3.0/uri/common.rb:227:in `parse'
from /usr/lib/ruby/gems/2.3.0/gems/r-train-0.11.3/lib/train.rb:66:in `target_config'
from /usr/lib/ruby/gems/2.3.0/gems/inspec-0.21.1/lib/inspec/backend.rb:16:in `create'
from /usr/lib/ruby/gems/2.3.0/gems/inspec-0.21.1/lib/inspec/runner.rb:45:in `configure_transport'
from /usr/lib/ruby/gems/2.3.0/gems/inspec-0.21.1/lib/inspec/runner.rb:29:in `initialize'
from /usr/lib/ruby/gems/2.3.0/gems/inspec-0.21.1/lib/inspec/cli.rb:141:in `new'
from /usr/lib/ruby/gems/2.3.0/gems/inspec-0.21.1/lib/inspec/cli.rb:141:in `shell_func'
from /usr/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /usr/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /usr/lib/ruby/gems/2.3.0/gems/inspec-0.21.1/bin/inspec:9:in `<top (required)>'
from /home/user/.gem/ruby/2.3.0/bin/inspec:22:in `load'
from /home/user/.gem/ruby/2.3.0/bin/inspec:22:in `<main>'
if i add a host entry in the ssh config like this:
Host testhost
Hostname 2000:111b:ffe2:1::2
and the use the following command then it works:
inspec shell -t ssh://pmuench@testhost --port 545 --key-files /home/user/.ssh/id_rsa
WARN: Unresolved specs during Gem::Specification.reset:
mixlib-shellout (~> 2.0)
winrm-fs (~> 0.3)
excon (>= 0.38.0)
ffi (>= 1.0.1)
unf_ext (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Welcome to the interactive InSpec Shell
To find out how to use it, type: help
inspec>
please keep in mind the compressed ipv6 address notation