From 6e9a4fb7765dda39656d1e95a743de1f79aab3b2 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Sat, 18 Jul 2015 18:56:16 +0200 Subject: Change some errors messages. --- auth/ssh.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'auth/ssh.php') diff --git a/auth/ssh.php b/auth/ssh.php index d8d56a1..e4d22a2 100644 --- a/auth/ssh.php +++ b/auth/ssh.php @@ -35,13 +35,13 @@ final class SSH extends Authentication { protected function check_config() { if ($this->config['auth'] == 'ssh-password') { if (!isset($this->config['user']) || !isset($this->config['pass'])) { - throw new Exception('User and password required for ssh-password.'); + throw new Exception('Router authentication configuration incomplete.'); } } if ($this->config['auth'] == 'ssh-key') { if (!isset($this->config['user']) || !isset($this->config['private_key'])) { - throw new Exception('User and private key required for ssh-key.'); + throw new Exception('Router authentication configuration incomplete.'); } } } @@ -62,11 +62,11 @@ final class SSH extends Authentication { $success = $this->connection->login($this->config['user'], $key); } else { - throw new Exception('Unknown type of connection for SSH.'); + throw new Exception('Unknown type of connection.'); } if (!$success) { - throw new Exception('SSH authentication failed.'); + throw new Exception('Cannot connect to router.'); } } -- cgit v1.2.3