generate ssh host keys for clients on puppetmasterSSH host key is not regenerated after rebootHow do you manage ssh keys to add a second user?sshd on mac does no longer accept connections in inetd (-i) mode, but does in do not detach mode (-D), how to fix?Manage ssh_known_hosts with puppetssh server: could not load host keyBest current authentication cipher for SSH2? Are certain ones only allowed/not allowed? How to tell what cipher an existing key is?SSH host key seems to be changing unexpectedlyCan I find local ssh private key from remote fingerprint?Collecting exported resource multiple timescan't loggin without password even with SSH key

Print lines between start & end pattern, but if end pattern does not exist, don't print

How can I end combat quickly when the outcome is inevitable?

Why does the Mishnah use the terms poor person and homeowner when discussing carrying on Shabbat?

Why 1,2 printed by a command in $() is not interpolated?

Is it legal for a bar bouncer to confiscate a fake ID

Has there been a multiethnic Star Trek character?

Teaching a class likely meant to inflate the GPA of student athletes

Writing an augmented sixth chord on the flattened supertonic

Is it a bad idea to to run 24 tap and shock lands in standard

I have a problematic assistant manager, but I can't fire him

Fixing obscure 8080 emulator bug?

Why didn't Voldemort recognize that Dumbledore was affected by his curse?

Can I utilise a baking stone to make crepes?

Overlapping String-Blocks

Is White controlling this game?

Active low-pass filters --- good to what frequencies?

Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?

Why are trash cans referred to as "zafacón" in Puerto Rico?

How did old MS-DOS games utilize various graphic cards?

Second (easy access) account in case my bank screws up

Meaning of 'lose their grip on the groins of their followers'

Why does Sin[b-a] simplify to -Sin[a-b]?

How is the excise border managed in Ireland?

What is the maximum number of net attacks that one can make in a round?



generate ssh host keys for clients on puppetmaster


SSH host key is not regenerated after rebootHow do you manage ssh keys to add a second user?sshd on mac does no longer accept connections in inetd (-i) mode, but does in do not detach mode (-D), how to fix?Manage ssh_known_hosts with puppetssh server: could not load host keyBest current authentication cipher for SSH2? Are certain ones only allowed/not allowed? How to tell what cipher an existing key is?SSH host key seems to be changing unexpectedlyCan I find local ssh private key from remote fingerprint?Collecting exported resource multiple timescan't loggin without password even with SSH key






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I look for a solution to create the ssh host keys for my puppet clients on the puppetmaster.
I did some research and found http://jsosic.wordpress.com/2012/12/04/managing-ssh-host-keys-with-puppet/, but I couldn't get it working. Is there a more elegant solution to handle that or a full example of that?



I know it's possible to generate the host keys on the clients and back them up to the puppetmaster, but I'd really prefer to generate them directly on the master.



Edit:



I created a module 'ssh'.



The content of init.pp is:




class ssh::server
if generate('/etc/puppet/modules/ssh/scripts/generate_host_keys.sh',
$keys_dir)
include ssh::server::keys



class ssh::server::keys
file '/etc/ssh/ssh_host_rsa_key.pub':
ensure => file,
owner => root,
group => root,
mode => '0644',
source => [
'puppet:///private/ssh/ssh_host_rsa_key.pub',
'puppet:///modules/ssh/ssh_host_rsa_key.pub',
],
require => Package['openssh-server'],
notify => Service[$service_name],




The content of the generate_host_keys.sh is the following:




#!/bin/bash

# check arg0: dir for keys
[ -z "$1" ] && echo "Please specify directory for key generation" && exit 1
KEYSDIR="$1"

# set umask
umask 0022

# create directory tree if it does not exist
[ ! -d "$KEYSDIR" ] && mkdir -p $KEYSDIR

#
# functions stolen from CentOS 6 sshd init script
#

# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
RSA1_KEY=$1/ssh_host_key
RSA_KEY=$1/ssh_host_rsa_key
DSA_KEY=$1/ssh_host_dsa_key

# source function library
. /etc/rc.d/init.d/functions

fips_enabled()
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi


do_rsa1_keygen()
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi


do_rsa_keygen()
if [ ! -s $RSA_KEY ]; then
echo -n $"Generating SSH2 RSA host key: "
rm -f $RSA_KEY
if test ! -f $RSA_KEY && $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA_KEY
chmod 644 $RSA_KEY.pub
success $"RSA key generation"
echo
else
failure $"RSA key generation"
echo
exit 1
fi
fi


do_dsa_keygen()
if [ ! -s $DSA_KEY ]; then
echo -n $"Generating SSH2 DSA host key: "
rm -f $DSA_KEY
if test ! -f $DSA_KEY && $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $DSA_KEY
chmod 644 $DSA_KEY.pub
success $"DSA key generation"
echo
else
failure $"DSA key generation"
echo
exit 1
fi
fi


# main
do_rsa1_keygen
do_rsa_keygen
do_dsa_keygen
chmod -R 644 $KEYSDIR/*
exit 0



manifests/site.pp looks like that




node 'mynode':
include ssh::server



Running puppet agent --test on the client produce the following output:




Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to execute generator /etc/puppet/modules/ssh/scripts/generate_host_keys.sh: Execution of '/etc/puppet/modules/ssh/scripts/generate_host_keys.sh ' returned 1: at /etc/puppet/modules/ssh/manifests/init.pp:2 on node nodename
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run



Thanks,



Paul










share|improve this question
























  • What does "couldn't get it working" mean? What did you try, what did you expect to happen, what happened instead?

    – Jenny D
    Jun 5 '13 at 7:28











  • sorry, I forgot to paste that :( I added it now.

    – Paul
    Jun 5 '13 at 7:39






  • 1





    Where is $keys_dir getting set?

    – Zoredache
    Jun 5 '13 at 9:16











  • Are there some better solution to do that? I don't tink this one is very clean. I'm just migrating from BCfg2 and look basically for a replacement for this module: docs.bcfg2.org/server/plugins/generators/sshbase.html @Zoredache

    – Paul
    Jun 7 '13 at 3:27











  • I think you'd want to take advantage of Puppet's Exported Resources (see puppet.com/docs/puppet/5.3/lang_exported.html) they even use ssh keys as an example.

    – Red Cricket
    Aug 12 '18 at 4:47

















1















I look for a solution to create the ssh host keys for my puppet clients on the puppetmaster.
I did some research and found http://jsosic.wordpress.com/2012/12/04/managing-ssh-host-keys-with-puppet/, but I couldn't get it working. Is there a more elegant solution to handle that or a full example of that?



I know it's possible to generate the host keys on the clients and back them up to the puppetmaster, but I'd really prefer to generate them directly on the master.



Edit:



I created a module 'ssh'.



The content of init.pp is:




class ssh::server
if generate('/etc/puppet/modules/ssh/scripts/generate_host_keys.sh',
$keys_dir)
include ssh::server::keys



class ssh::server::keys
file '/etc/ssh/ssh_host_rsa_key.pub':
ensure => file,
owner => root,
group => root,
mode => '0644',
source => [
'puppet:///private/ssh/ssh_host_rsa_key.pub',
'puppet:///modules/ssh/ssh_host_rsa_key.pub',
],
require => Package['openssh-server'],
notify => Service[$service_name],




The content of the generate_host_keys.sh is the following:




#!/bin/bash

# check arg0: dir for keys
[ -z "$1" ] && echo "Please specify directory for key generation" && exit 1
KEYSDIR="$1"

# set umask
umask 0022

# create directory tree if it does not exist
[ ! -d "$KEYSDIR" ] && mkdir -p $KEYSDIR

#
# functions stolen from CentOS 6 sshd init script
#

# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
RSA1_KEY=$1/ssh_host_key
RSA_KEY=$1/ssh_host_rsa_key
DSA_KEY=$1/ssh_host_dsa_key

# source function library
. /etc/rc.d/init.d/functions

fips_enabled()
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi


do_rsa1_keygen()
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi


do_rsa_keygen()
if [ ! -s $RSA_KEY ]; then
echo -n $"Generating SSH2 RSA host key: "
rm -f $RSA_KEY
if test ! -f $RSA_KEY && $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA_KEY
chmod 644 $RSA_KEY.pub
success $"RSA key generation"
echo
else
failure $"RSA key generation"
echo
exit 1
fi
fi


do_dsa_keygen()
if [ ! -s $DSA_KEY ]; then
echo -n $"Generating SSH2 DSA host key: "
rm -f $DSA_KEY
if test ! -f $DSA_KEY && $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $DSA_KEY
chmod 644 $DSA_KEY.pub
success $"DSA key generation"
echo
else
failure $"DSA key generation"
echo
exit 1
fi
fi


# main
do_rsa1_keygen
do_rsa_keygen
do_dsa_keygen
chmod -R 644 $KEYSDIR/*
exit 0



manifests/site.pp looks like that




node 'mynode':
include ssh::server



Running puppet agent --test on the client produce the following output:




Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to execute generator /etc/puppet/modules/ssh/scripts/generate_host_keys.sh: Execution of '/etc/puppet/modules/ssh/scripts/generate_host_keys.sh ' returned 1: at /etc/puppet/modules/ssh/manifests/init.pp:2 on node nodename
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run



Thanks,



Paul










share|improve this question
























  • What does "couldn't get it working" mean? What did you try, what did you expect to happen, what happened instead?

    – Jenny D
    Jun 5 '13 at 7:28











  • sorry, I forgot to paste that :( I added it now.

    – Paul
    Jun 5 '13 at 7:39






  • 1





    Where is $keys_dir getting set?

    – Zoredache
    Jun 5 '13 at 9:16











  • Are there some better solution to do that? I don't tink this one is very clean. I'm just migrating from BCfg2 and look basically for a replacement for this module: docs.bcfg2.org/server/plugins/generators/sshbase.html @Zoredache

    – Paul
    Jun 7 '13 at 3:27











  • I think you'd want to take advantage of Puppet's Exported Resources (see puppet.com/docs/puppet/5.3/lang_exported.html) they even use ssh keys as an example.

    – Red Cricket
    Aug 12 '18 at 4:47













1












1








1


3






I look for a solution to create the ssh host keys for my puppet clients on the puppetmaster.
I did some research and found http://jsosic.wordpress.com/2012/12/04/managing-ssh-host-keys-with-puppet/, but I couldn't get it working. Is there a more elegant solution to handle that or a full example of that?



I know it's possible to generate the host keys on the clients and back them up to the puppetmaster, but I'd really prefer to generate them directly on the master.



Edit:



I created a module 'ssh'.



The content of init.pp is:




class ssh::server
if generate('/etc/puppet/modules/ssh/scripts/generate_host_keys.sh',
$keys_dir)
include ssh::server::keys



class ssh::server::keys
file '/etc/ssh/ssh_host_rsa_key.pub':
ensure => file,
owner => root,
group => root,
mode => '0644',
source => [
'puppet:///private/ssh/ssh_host_rsa_key.pub',
'puppet:///modules/ssh/ssh_host_rsa_key.pub',
],
require => Package['openssh-server'],
notify => Service[$service_name],




The content of the generate_host_keys.sh is the following:




#!/bin/bash

# check arg0: dir for keys
[ -z "$1" ] && echo "Please specify directory for key generation" && exit 1
KEYSDIR="$1"

# set umask
umask 0022

# create directory tree if it does not exist
[ ! -d "$KEYSDIR" ] && mkdir -p $KEYSDIR

#
# functions stolen from CentOS 6 sshd init script
#

# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
RSA1_KEY=$1/ssh_host_key
RSA_KEY=$1/ssh_host_rsa_key
DSA_KEY=$1/ssh_host_dsa_key

# source function library
. /etc/rc.d/init.d/functions

fips_enabled()
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi


do_rsa1_keygen()
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi


do_rsa_keygen()
if [ ! -s $RSA_KEY ]; then
echo -n $"Generating SSH2 RSA host key: "
rm -f $RSA_KEY
if test ! -f $RSA_KEY && $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA_KEY
chmod 644 $RSA_KEY.pub
success $"RSA key generation"
echo
else
failure $"RSA key generation"
echo
exit 1
fi
fi


do_dsa_keygen()
if [ ! -s $DSA_KEY ]; then
echo -n $"Generating SSH2 DSA host key: "
rm -f $DSA_KEY
if test ! -f $DSA_KEY && $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $DSA_KEY
chmod 644 $DSA_KEY.pub
success $"DSA key generation"
echo
else
failure $"DSA key generation"
echo
exit 1
fi
fi


# main
do_rsa1_keygen
do_rsa_keygen
do_dsa_keygen
chmod -R 644 $KEYSDIR/*
exit 0



manifests/site.pp looks like that




node 'mynode':
include ssh::server



Running puppet agent --test on the client produce the following output:




Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to execute generator /etc/puppet/modules/ssh/scripts/generate_host_keys.sh: Execution of '/etc/puppet/modules/ssh/scripts/generate_host_keys.sh ' returned 1: at /etc/puppet/modules/ssh/manifests/init.pp:2 on node nodename
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run



Thanks,



Paul










share|improve this question
















I look for a solution to create the ssh host keys for my puppet clients on the puppetmaster.
I did some research and found http://jsosic.wordpress.com/2012/12/04/managing-ssh-host-keys-with-puppet/, but I couldn't get it working. Is there a more elegant solution to handle that or a full example of that?



I know it's possible to generate the host keys on the clients and back them up to the puppetmaster, but I'd really prefer to generate them directly on the master.



Edit:



I created a module 'ssh'.



The content of init.pp is:




class ssh::server
if generate('/etc/puppet/modules/ssh/scripts/generate_host_keys.sh',
$keys_dir)
include ssh::server::keys



class ssh::server::keys
file '/etc/ssh/ssh_host_rsa_key.pub':
ensure => file,
owner => root,
group => root,
mode => '0644',
source => [
'puppet:///private/ssh/ssh_host_rsa_key.pub',
'puppet:///modules/ssh/ssh_host_rsa_key.pub',
],
require => Package['openssh-server'],
notify => Service[$service_name],




The content of the generate_host_keys.sh is the following:




#!/bin/bash

# check arg0: dir for keys
[ -z "$1" ] && echo "Please specify directory for key generation" && exit 1
KEYSDIR="$1"

# set umask
umask 0022

# create directory tree if it does not exist
[ ! -d "$KEYSDIR" ] && mkdir -p $KEYSDIR

#
# functions stolen from CentOS 6 sshd init script
#

# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
RSA1_KEY=$1/ssh_host_key
RSA_KEY=$1/ssh_host_rsa_key
DSA_KEY=$1/ssh_host_dsa_key

# source function library
. /etc/rc.d/init.d/functions

fips_enabled()
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi


do_rsa1_keygen()
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi


do_rsa_keygen()
if [ ! -s $RSA_KEY ]; then
echo -n $"Generating SSH2 RSA host key: "
rm -f $RSA_KEY
if test ! -f $RSA_KEY && $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA_KEY
chmod 644 $RSA_KEY.pub
success $"RSA key generation"
echo
else
failure $"RSA key generation"
echo
exit 1
fi
fi


do_dsa_keygen()
if [ ! -s $DSA_KEY ]; then
echo -n $"Generating SSH2 DSA host key: "
rm -f $DSA_KEY
if test ! -f $DSA_KEY && $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $DSA_KEY
chmod 644 $DSA_KEY.pub
success $"DSA key generation"
echo
else
failure $"DSA key generation"
echo
exit 1
fi
fi


# main
do_rsa1_keygen
do_rsa_keygen
do_dsa_keygen
chmod -R 644 $KEYSDIR/*
exit 0



manifests/site.pp looks like that




node 'mynode':
include ssh::server



Running puppet agent --test on the client produce the following output:




Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to execute generator /etc/puppet/modules/ssh/scripts/generate_host_keys.sh: Execution of '/etc/puppet/modules/ssh/scripts/generate_host_keys.sh ' returned 1: at /etc/puppet/modules/ssh/manifests/init.pp:2 on node nodename
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run



Thanks,



Paul







ssh puppet






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 5 '13 at 7:38







Paul

















asked Jun 5 '13 at 6:58









PaulPaul

1117




1117












  • What does "couldn't get it working" mean? What did you try, what did you expect to happen, what happened instead?

    – Jenny D
    Jun 5 '13 at 7:28











  • sorry, I forgot to paste that :( I added it now.

    – Paul
    Jun 5 '13 at 7:39






  • 1





    Where is $keys_dir getting set?

    – Zoredache
    Jun 5 '13 at 9:16











  • Are there some better solution to do that? I don't tink this one is very clean. I'm just migrating from BCfg2 and look basically for a replacement for this module: docs.bcfg2.org/server/plugins/generators/sshbase.html @Zoredache

    – Paul
    Jun 7 '13 at 3:27











  • I think you'd want to take advantage of Puppet's Exported Resources (see puppet.com/docs/puppet/5.3/lang_exported.html) they even use ssh keys as an example.

    – Red Cricket
    Aug 12 '18 at 4:47

















  • What does "couldn't get it working" mean? What did you try, what did you expect to happen, what happened instead?

    – Jenny D
    Jun 5 '13 at 7:28











  • sorry, I forgot to paste that :( I added it now.

    – Paul
    Jun 5 '13 at 7:39






  • 1





    Where is $keys_dir getting set?

    – Zoredache
    Jun 5 '13 at 9:16











  • Are there some better solution to do that? I don't tink this one is very clean. I'm just migrating from BCfg2 and look basically for a replacement for this module: docs.bcfg2.org/server/plugins/generators/sshbase.html @Zoredache

    – Paul
    Jun 7 '13 at 3:27











  • I think you'd want to take advantage of Puppet's Exported Resources (see puppet.com/docs/puppet/5.3/lang_exported.html) they even use ssh keys as an example.

    – Red Cricket
    Aug 12 '18 at 4:47
















What does "couldn't get it working" mean? What did you try, what did you expect to happen, what happened instead?

– Jenny D
Jun 5 '13 at 7:28





What does "couldn't get it working" mean? What did you try, what did you expect to happen, what happened instead?

– Jenny D
Jun 5 '13 at 7:28













sorry, I forgot to paste that :( I added it now.

– Paul
Jun 5 '13 at 7:39





sorry, I forgot to paste that :( I added it now.

– Paul
Jun 5 '13 at 7:39




1




1





Where is $keys_dir getting set?

– Zoredache
Jun 5 '13 at 9:16





Where is $keys_dir getting set?

– Zoredache
Jun 5 '13 at 9:16













Are there some better solution to do that? I don't tink this one is very clean. I'm just migrating from BCfg2 and look basically for a replacement for this module: docs.bcfg2.org/server/plugins/generators/sshbase.html @Zoredache

– Paul
Jun 7 '13 at 3:27





Are there some better solution to do that? I don't tink this one is very clean. I'm just migrating from BCfg2 and look basically for a replacement for this module: docs.bcfg2.org/server/plugins/generators/sshbase.html @Zoredache

– Paul
Jun 7 '13 at 3:27













I think you'd want to take advantage of Puppet's Exported Resources (see puppet.com/docs/puppet/5.3/lang_exported.html) they even use ssh keys as an example.

– Red Cricket
Aug 12 '18 at 4:47





I think you'd want to take advantage of Puppet's Exported Resources (see puppet.com/docs/puppet/5.3/lang_exported.html) they even use ssh keys as an example.

– Red Cricket
Aug 12 '18 at 4:47










1 Answer
1






active

oldest

votes


















0














  1. Try to add /usr/bin/env as the first parameter of the generate function:
    if generate('/usr/bin/env','/etc/puppet/modules/ssh/scripts/generate_host_keys.sh', $keys_dir) {


  2. Verify that your script returns 0 on exit, non-zero return code will make the parser throw an Error 400






share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f513318%2fgenerate-ssh-host-keys-for-clients-on-puppetmaster%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    1. Try to add /usr/bin/env as the first parameter of the generate function:
      if generate('/usr/bin/env','/etc/puppet/modules/ssh/scripts/generate_host_keys.sh', $keys_dir) {


    2. Verify that your script returns 0 on exit, non-zero return code will make the parser throw an Error 400






    share|improve this answer





























      0














      1. Try to add /usr/bin/env as the first parameter of the generate function:
        if generate('/usr/bin/env','/etc/puppet/modules/ssh/scripts/generate_host_keys.sh', $keys_dir) {


      2. Verify that your script returns 0 on exit, non-zero return code will make the parser throw an Error 400






      share|improve this answer



























        0












        0








        0







        1. Try to add /usr/bin/env as the first parameter of the generate function:
          if generate('/usr/bin/env','/etc/puppet/modules/ssh/scripts/generate_host_keys.sh', $keys_dir) {


        2. Verify that your script returns 0 on exit, non-zero return code will make the parser throw an Error 400






        share|improve this answer















        1. Try to add /usr/bin/env as the first parameter of the generate function:
          if generate('/usr/bin/env','/etc/puppet/modules/ssh/scripts/generate_host_keys.sh', $keys_dir) {


        2. Verify that your script returns 0 on exit, non-zero return code will make the parser throw an Error 400







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 17 '18 at 14:12









        Gerald Schneider

        7,24332748




        7,24332748










        answered Jul 19 '13 at 15:56









        marjimarji

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f513318%2fgenerate-ssh-host-keys-for-clients-on-puppetmaster%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

            Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

            Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020