{"record":{"id":"63cd5a3bc8b875b9","repo":"ytti/oxidized","slug":"output-not-matching-configured-prompt-node","errorCode":null,"errorMessage":"#{@output} not matching configured prompt #{@node.prompt}","messagePattern":"#(.+?) not matching configured prompt #(.+?)","errorType":"exception","errorClass":"PromptUndetect","httpStatus":null,"severity":"error","filePath":"lib/oxidized/input/ssh.rb","lineNumber":34,"sourceCode":"    end\n\n    def connect(node) # rubocop:disable Naming/PredicateMethod\n      @node        = node\n      @output      = String.new('')\n      @pty_options = { term: \"vt100\" }\n      @node.model.cfg['ssh'].each { |cb| instance_exec(&cb) }\n\n      @yaml_debug = DebugYAML.new(Oxidized.config.input.debug, @node, config_name)\n      @text_debug = DebugText.new(Oxidized.config.input.debug, @node, config_name)\n\n      logger.debug \"Connecting to #{@node.name}\"\n      @ssh = Net::SSH.start(@node.ip, @node.auth[:username], make_ssh_opts)\n      unless @exec\n        shell_open @ssh\n        begin\n          login\n        rescue Timeout::Error\n          raise PromptUndetect, [@output, 'not matching configured prompt', @node.prompt].join(' ')\n        end\n      end\n      connected?\n    end\n\n    def cmd(cmd, expect = node.prompt)\n      unless cmd.is_a?(String)\n        logger.error \"cmd must be a String (#{cmd.class}): #{cmd.inspect} @ #{node.name}\"\n        raise ArgumentError, \"cmd must be a String\"\n      end\n      logger.debug \"Sending '#{cmd.dump}' @ #{node.name} with expect: #{expect.inspect}\"\n      cmd_output = if @exec\n                     @yaml_debug&.send_data(cmd)\n                     @text_debug&.send_data(cmd)\n                     @ssh.exec! cmd\n                   else\n                     cmd_shell(cmd, expect).gsub(\"\\r\\n\", \"\\n\")\n                   end","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/input/ssh.rb#L16-L52","documentation":"Error \"#{@output} not matching configured prompt #{@node.prompt}\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/input/ssh.rb:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}