From d6700685673efd8ebb932d85a70626f6d1eb181e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 3 Dec 2009 12:07:39 -0800 Subject: Require key-type to be set. --- templates/system/login/user/node.tag/authorized-keys/node.def | 2 ++ .../login/user/node.tag/authorized-keys/node.tag/key-type/node.def | 4 ++++ .../system/login/user/node.tag/authorized-keys/node.tag/type/node.def | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 templates/system/login/user/node.tag/authorized-keys/node.tag/key-type/node.def delete mode 100644 templates/system/login/user/node.tag/authorized-keys/node.tag/type/node.def diff --git a/templates/system/login/user/node.tag/authorized-keys/node.def b/templates/system/login/user/node.tag/authorized-keys/node.def index 1587fa46..4ca232f8 100644 --- a/templates/system/login/user/node.tag/authorized-keys/node.def +++ b/templates/system/login/user/node.tag/authorized-keys/node.def @@ -4,6 +4,8 @@ help: Set public keys for authorized login syntax:expression: pattern $VAR(@) "^[0-9A-Za-z+/=]*$" ; "Invalid public key not base-64" +commit:expression: $VAR(key-type) != "" ; "key-type must be specified" + comp_help: Public key of remote user allowed to login without password The key must be encode as base-64 text string. The key is usually diff --git a/templates/system/login/user/node.tag/authorized-keys/node.tag/key-type/node.def b/templates/system/login/user/node.tag/authorized-keys/node.tag/key-type/node.def new file mode 100644 index 00000000..54482824 --- /dev/null +++ b/templates/system/login/user/node.tag/authorized-keys/node.tag/key-type/node.def @@ -0,0 +1,4 @@ +type: txt +help: Public key type +allowed: echo "ssh-dsa ssh-rsa" +syntax:expression: $VAR(@) in "ssh-rsa", "ssh-dsa" diff --git a/templates/system/login/user/node.tag/authorized-keys/node.tag/type/node.def b/templates/system/login/user/node.tag/authorized-keys/node.tag/type/node.def deleted file mode 100644 index 54482824..00000000 --- a/templates/system/login/user/node.tag/authorized-keys/node.tag/type/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Public key type -allowed: echo "ssh-dsa ssh-rsa" -syntax:expression: $VAR(@) in "ssh-rsa", "ssh-dsa" -- cgit v1.2.3