/usr/share/augeas/lenses/dist/tests/test_authorized_keys.aug is in augeas-lenses 1.4.0-0ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | (*
Module: Test_Authorized_Keys
Provides unit tests and examples for the <Authorized_Keys> lens.
*)
module Test_Authorized_Keys =
(* Test: Authorized_Keys *)
test Authorized_Keys.lns get "tunnel=\"0\",no-agent-forwarding,command=\"sh /etc/netstart tun0\",permitopen=\"192.0.2.1:80\",permitopen=\"192.0.2.2:25\" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3RC8whKGFx+b7BMTFtnIWl6t/qyvOvnuqIrMNI9J8+1sEYv8Y/pJRh0vAe2RaSKAgB2hyzXwSJ1Fh+ooraUAJ+q7P2gg2kQF1nCFeGVjtV9m4ZrV5kZARcQMhp0Bp67tPo2TCtnthPYZS/YQG6u/6Aco1XZjPvuKujAQMGSgqNskhKBO9zfhhkAMIcKVryjKYHDfqbDUCCSNzlwFLts3nJ0Hfno6Hz+XxuBIfKOGjHfbzFyUQ7smYnzF23jFs4XhvnjmIGQJcZT4kQAsRwQubyuyDuqmQXqa+2SuQfkKTaPOlVqyuEWJdG2weIF8g3YP12czsBgNppz3jsnhEgstnQ== rpinson on rpinson\n" =
{ "key" = "AAAAB3NzaC1yc2EAAAABIwAAAQEA3RC8whKGFx+b7BMTFtnIWl6t/qyvOvnuqIrMNI9J8+1sEYv8Y/pJRh0vAe2RaSKAgB2hyzXwSJ1Fh+ooraUAJ+q7P2gg2kQF1nCFeGVjtV9m4ZrV5kZARcQMhp0Bp67tPo2TCtnthPYZS/YQG6u/6Aco1XZjPvuKujAQMGSgqNskhKBO9zfhhkAMIcKVryjKYHDfqbDUCCSNzlwFLts3nJ0Hfno6Hz+XxuBIfKOGjHfbzFyUQ7smYnzF23jFs4XhvnjmIGQJcZT4kQAsRwQubyuyDuqmQXqa+2SuQfkKTaPOlVqyuEWJdG2weIF8g3YP12czsBgNppz3jsnhEgstnQ=="
{ "options"
{ "tunnel" = "0" }
{ "no-agent-forwarding" }
{ "command" = "sh /etc/netstart tun0" }
{ "permitopen" = "192.0.2.1:80" }
{ "permitopen" = "192.0.2.2:25" }
}
{ "type" = "ssh-rsa" }
{ "comment" = "rpinson on rpinson" } }
(* Variable: keys *)
let keys = "# Example keys, one of each type
#
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpWrKYsEsVUyuwMN4ReBN/TMGsaUWzDKDz/uQr6MlNNM95MDK/BPyJ+DiBiNMFVLpRt3gH3eCJBLJKMuUDaTNy5uym2zNgAaAIVct6M2GHI68W3iY3Ja8/MaRPbyTpMh1O74S+McpAW1SGL2YzFchYMjTnu/kOD3lxiWNiDLvdLFZu0wPOi7CYG37VXR4Thb0cC92zqnCjaP1TwfhpEYUZoowElYkoV2vG+19O6cRm/zduYcf8hmegZKB4GFUJTtZ2gZ18XJDSQd0ykK3KPt/+bKskdrtfiOwSZAmUZmd2YuAlY6+CBn1T3UBdQntueukd0z1xhd6SX7Bl8+qyqLQ3 user@example
ssh-dsa AAAA user@example
ecdsa-sha2-nistp256 AAAA user@example
ssh-ed25519 AAAA user@example
# Example comments
ssh-dsa AAAA
ssh-dsa AAAA user@example
"
(* Test: Authorized_Keys.lns *)
test Authorized_Keys.lns get keys =
{ "#comment" = "Example keys, one of each type" }
{ }
{ "key" =
"AAAAB3NzaC1yc2EAAAADAQABAAABAQDpWrKYsEsVUyuwMN4ReBN/TMGsaUWzDKDz/uQr6MlNNM95MDK/BPyJ+DiBiNMFVLpRt3gH3eCJBLJKMuUDaTNy5uym2zNgAaAIVct6M2GHI68W3iY3Ja8/MaRPbyTpMh1O74S+McpAW1SGL2YzFchYMjTnu/kOD3lxiWNiDLvdLFZu0wPOi7CYG37VXR4Thb0cC92zqnCjaP1TwfhpEYUZoowElYkoV2vG+19O6cRm/zduYcf8hmegZKB4GFUJTtZ2gZ18XJDSQd0ykK3KPt/+bKskdrtfiOwSZAmUZmd2YuAlY6+CBn1T3UBdQntueukd0z1xhd6SX7Bl8+qyqLQ3"
{ "type" = "ssh-rsa" }
{ "comment" = "user@example" }
}
{ "key" = "AAAA"
{ "type" = "ssh-dsa" }
{ "comment" = "user@example" }
}
{ "key" = "AAAA"
{ "type" = "ecdsa-sha2-nistp256" }
{ "comment" = "user@example" }
}
{ "key" = "AAAA"
{ "type" = "ssh-ed25519" }
{ "comment" = "user@example" }
}
{ }
{ "#comment" = "Example comments" }
{ "key" = "AAAA"
{ "type" = "ssh-dsa" }
}
{ "key" = "AAAA"
{ "type" = "ssh-dsa" }
{ "comment" = "user@example" }
}
(* Variable: options *)
let options = "# Example options
no-pty ssh-dsa AAAA
no-pty ssh-ed25519 AAAA
no-pty,command=\"foo\" ssh-dsa AAAA
no-pty,command=\"foo bar\" ssh-dsa AAAA
no-pty,from=\"example.com,10.1.1.0/16\" ssh-dsa AAAA
no-pty,environment=\"LANG=en_GB.UTF8\" ssh-dsa AAAA
"
(* Test: Authorized_Keys.lns *)
test Authorized_Keys.lns get options =
{ "#comment" = "Example options" }
{ "key" = "AAAA"
{ "options"
{ "no-pty" }
}
{ "type" = "ssh-dsa" }
}
{ "key" = "AAAA"
{ "options"
{ "no-pty" }
}
{ "type" = "ssh-ed25519" }
}
{ "key" = "AAAA"
{ "options"
{ "no-pty" }
{ "command" = "foo" }
}
{ "type" = "ssh-dsa" }
}
{ "key" = "AAAA"
{ "options"
{ "no-pty" }
{ "command" = "foo bar" }
}
{ "type" = "ssh-dsa" }
}
{ "key" = "AAAA"
{ "options"
{ "no-pty" }
{ "from" = "example.com,10.1.1.0/16" }
}
{ "type" = "ssh-dsa" }
}
{ "key" = "AAAA"
{ "options"
{ "no-pty" }
{ "environment" = "LANG=en_GB.UTF8" }
}
{ "type" = "ssh-dsa" }
}
(* Test: Authorized_keys.lns
GH 165 *)
test Authorized_keys.lns get "command=\"echo 'Please login as the user \\\"blaauser\\\" rather than the user \\\"root\\\".';echo;sleep 10\" ssh-rsa DEADBEEF== username1\n" =
{ "key" = "DEADBEEF=="
{ "options"
{ "command" = "echo 'Please login as the user \\\"blaauser\\\" rather than the user \\\"root\\\".';echo;sleep 10" }
}
{ "type" = "ssh-rsa" }
{ "comment" = "username1" }
}
|