summaryrefslogtreecommitdiff
path: root/auth/ssh.php
diff options
context:
space:
mode:
authorGuillaume Mazoyer <gmazoyer@gravitons.in>2015-07-18 18:56:16 +0200
committerGuillaume Mazoyer <gmazoyer@gravitons.in>2015-07-18 18:56:16 +0200
commit6e9a4fb7765dda39656d1e95a743de1f79aab3b2 (patch)
treeec2bc7676556af5540e14aaf12db5902c78e545e /auth/ssh.php
parent0299cfd753fb468e20605c62e4147c77529e0aae (diff)
Change some errors messages.
Diffstat (limited to 'auth/ssh.php')
-rw-r--r--auth/ssh.php8
1 files changed, 4 insertions, 4 deletions
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.');
}
}