From 321fe387894ffbbd7d4d67c6330952ec0343c678 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Mon, 16 Jun 2014 13:26:10 +0300 Subject: openssh module: root login keys --- aconf/modules/openssh.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/aconf/modules/openssh.lua b/aconf/modules/openssh.lua index 5ca2544..3b37759 100644 --- a/aconf/modules/openssh.lua +++ b/aconf/modules/openssh.lua @@ -6,6 +6,20 @@ See LICENSE file for license details local M = require('aconf.model') +local SshKey = M.new() +SshKey.type = M.String{ + required=true, + choice={ + {'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp256'}, + {'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp384'}, + {'ecdsa-sha2-nistp521', 'ecdsa-sha2-nistp521'}, + {'ssh-dss', 'ssh-dss'}, + {'ssh-rsa', 'ssh-rsa'} + } +} +SshKey.key = M.String{addr='&'} +SshKey.comment = M.String + local Sshd = M.service('sshd') Sshd.root_login = M.Boolean{ addr='PermitRootLogin', ui_name='Permit root login', default=true @@ -19,6 +33,12 @@ Sshd.use_dns = M.Boolean{addr='UseDNS', ui_name='Use DNS', default=true} Sshd.agent_forward = M.Boolean{ addr='AllowAgentForwarding', ui_name='Allow agent forwarding', default=true } +Sshd.root_auth_keys = M.List{ + type=SshKey, + addr='/augeas/root/.ssh/authorized_keys/key/#', + ui_name='Root login keys', + ui_member='Key' +} M.register( 'sshd', -- cgit v1.2.3