public function onInstallReleaseCompleteOrFailedShutdownSSHAgent(Event $event, $eventName, EventDispatcherInterface $eventDispatcher)
    {
        if ($this->host instanceof Host) {
            $connection = $this->ensureConnection($this->host);

            $eventDispatcher->dispatch(AccompliEvents::LOG, new LogEvent(LogLevel::NOTICE, 'Terminating SSH agent...', $eventName, $this, array('event.task.action' => TaskInterface::ACTION_IN_PROGRESS)));

            $result = $connection->executeCommand('eval $(ssh-agent -k)');
            if ($result->isSuccessful()) {
                $eventDispatcher->dispatch(AccompliEvents::LOG, new LogEvent(LogLevel::NOTICE, 'Terminated SSH agent.', $eventName, $this, array('event.task.action' => TaskInterface::ACTION_COMPLETED, 'output.resetLine' => true)));
            } else {
                $eventDispatcher->dispatch(AccompliEvents::LOG, new LogEvent(LogLevel::WARNING, 'Failed terminating SSH agent.', $eventName, $this, array('event.task.action' => TaskInterface::ACTION_FAILED, 'output.resetLine' => true)));
            }
        }
    }