Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit 49179b55 authored by Benedikt Wegmann's avatar Benedikt Wegmann
Browse files

openssh: authorized_keys

parent eab4e655
No related branches found
No related tags found
No related merge requests found
# openssh-server konfigurieren
class ubuntu_server::openssh_server($port="22",$groups_only="root"){
class ubuntu_server::openssh_server($port="22",$groups_only="root",$authorized_keys=""){
package{['openssh-server','openssh-blacklist-extra','openssh-blacklist']:
ensure => present,
......@@ -26,6 +26,19 @@ class ubuntu_server::openssh_server($port="22",$groups_only="root"){
require => Package["openssh-server"],
} ~> Service['ssh']
unless $authorized_keys == "" {
file{'/root/.ssh':
ensure => directory,
mode => 0700,
}
file{'/root/.ssh/authorized_keys':
ensure => present,
mode => 0664,
source => $authorized_keys,
}
}
file_line{'openssh_server_config_KexAlgorithms':
path => "/etc/ssh/sshd_config",
line => "KexAlgorithms diffie-hellman-group-exchange-sha256",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment