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

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company