{"record":{"id":"749d8fd97ca6be81","repo":"hashicorp/vagrant","slug":"an-error-occurred-in-the-underlying-ssh-library-th","errorCode":null,"errorMessage":"An error occurred in the underlying SSH library that Vagrant uses.\nThe error message is shown below. In many cases, errors from this\nlibrary are caused by ssh-agent issues. Try disabling your SSH\nagent or removing some keys and try again.\n\nIf the problem persists, please report a bug to the net-ssh project.\n\n%{message}","messagePattern":"An error occurred in the underlying SSH library that Vagrant uses\\.\nThe error message is shown below\\. In many cases, errors from this\nlibrary are caused by ssh-agent issues\\. Try disabling your SSH\nagent or removing some keys and try again\\.\n\nIf the problem persists, please report a bug to the net-ssh project\\.\n\n%(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::NetSSHException","httpStatus":null,"severity":"error","filePath":"plugins/communicators/ssh/communicator.rb","lineNumber":575,"sourceCode":"          # This is raised if we failed to connect the max amount of times\n          raise Vagrant::Errors::SSHConnectionRefused\n        rescue Errno::ECONNRESET\n          # This is raised if we failed to connect the max number of times\n          # due to an ECONNRESET.\n          raise Vagrant::Errors::SSHConnectionReset\n        rescue Errno::ECONNABORTED\n          # This is raised if we failed to connect the max number of times\n          # due to an ECONNABORTED\n          raise Vagrant::Errors::SSHConnectionAborted\n        rescue Errno::EHOSTDOWN\n          # This is raised if we get an ICMP DestinationUnknown error.\n          raise Vagrant::Errors::SSHHostDown\n        rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH\n          # This is raised if we can't work out how to route traffic.\n          raise Vagrant::Errors::SSHNoRoute\n        rescue Net::SSH::Exception => e\n          # This is an internal error in Net::SSH\n          raise Vagrant::Errors::NetSSHException, message: e.message\n        rescue NotImplementedError\n          # This is raised if a private key type that Net-SSH doesn't support\n          # is used. Show a nicer error.\n          raise Vagrant::Errors::SSHKeyTypeNotSupported\n        end\n\n        @connection          = connection\n        @connection_ssh_info = ssh_info\n\n        # Yield the connection that is ready to be used and\n        # return the value of the block\n        return yield connection if block_given?\n      end\n\n      # The shell wrapper command used in shell_execute defined by\n      # the sudo and shell options.\n      def shell_cmd(opts)\n        sudo  = opts[:sudo]","sourceCodeStart":557,"sourceCodeEnd":593,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/communicators/ssh/communicator.rb#L557-L593","documentation":"Error \"An error occurred in the underlying SSH library that Vagrant uses.\nThe error message is shown below. In many cases, errors from this\nlibrary are caused by ssh-agent issues. Try disabling your SSH\nagent or removing some keys and try again.\n\nIf the problem persists, please report a bug to the net-ssh project.\n\n%{message}\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at plugins/communicators/ssh/communicator.rb:575 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":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}