summaryrefslogtreecommitdiffstats
path: root/openssh-config-html.lsp
blob: bec5e56f0eb6f24c33fb856bac69da6324d3e3eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<? local form = ... 
require("viewfunctions")
?>

<!-- <?
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
?> --!>

<?
function checked(b)
	if b then
		return "checked"
	end
	return ""
end

port = form.config.Port
listen_address = form.config.ListenAddress
use_dns = checked(form.config.UseDNS)
password_authentication = checked(form.config.PasswordAuthentication)
permit_root_login = checked(form.config.PermitRootLogin)

?>

<H1>SSH Configuration</H1>
<DL>
<? 
local myform = form.status 
local tags = { "status", "version", "autostart", }
-- displayinfo(myform,tags,"viewonly")
?>
</DL>

<form name="cmd" action="" method="POST">
<dl>
	<dt><label for="port">Port</label></dt>
	<dd><input class="text" type="text" id="port" value="<?= port ?>"/></dd>
	
	<dt><label for="address">Listen address</label></dt>
	<dd><input class="text" type="text" id="address" value="<?= listen_address ?>"/></dd>

	<dt><label for="PermitRootLogin">Permit Root Login</label></dt>
	<dd><input type="checkbox" name="PermitRootLogin" id="PermitRootLogin"
	<?= permit_root_login ?> />

	<dt><label for="PasswordAuthentication">Password Authentication</label></dt>
	<dd><input type="checkbox" name="PasswordAuthentication" id="PasswordAuthentication" <?= password_authentication ?>/>

	<dt><label for="UseDNS">Use DNS</label></dt>
	<dd><input type="checkbox" name="UseDNS" id="UseDNS" <?= use_dns ?>/>

	<dt>&nbsp;</dt>
	<dd><input type="submit" id="Apply" value="Apply"/></dd>
</dl>
<?
-- Management buttons
local myform = form.management
local tags = { "start", "stop", "restart" }
if (myform) then
	io.write("<H1>MANAGEMENT</H1>\n<DL>")
	displaymanagement(myform,tags)
	io.write("</DL>")
end
?>
</form>