SSH no password between all machines login KS file template

Source: Internet
Author: User
Tags begin rsa private key

[Email protected] ~]# CAT/VAR/LIB/COBBLER/KICKSTARTS/RHEL_6.5_FOR_HP_CEPH.KS

#platform =x86, AMD64, or Intel EM64T

# System Authorization Information

Auth--useshadow--enablemd5

# System Bootloader Configuration

Bootloader--LOCATION=MBR

# Partition Clearing Information

#clearpart--linux--DRIVES=SDA

# ignoredisk--ONLY-USE=SDA #ignore more disk

Clearpart--all--initlabel

# Use text mode install

Text

# Firewall Configuration

Firewall--disable

# Run The Setup Agent on first boot

Firstboot--disable

# System Keyboard

Keyboard US

# System Language

Lang en_US

# Use Network Installation

URL--url= $tree

# If Any cobbler repo definitions were referenced in the Kickstart profiles, include them here.

$yum _repo_stanza

# Network Information

$SNIPPET (' Network_config ')

# Reboot after installation

Reboot


#Root Password

ROOTPW jiayuan.com

# SELinux Configuration

SELinux--disabled

# Do not configure the X Window System

Skipx

# System TimeZone

TimeZone--UTC Asia/shanghai

# Install OS instead of upgrade

Install

Key--skip

# Clear the Master Boot Record

Zerombr

# Allow Anaconda to partition the system as needed

Part/boot--FSTYPE=EXT4--size=200

Part swap--size=32000

Part/--FSTYPE=EXT4--size=200000


%pre

$SNIPPET (' Log_ks_pre ')

$SNIPPET (' Kickstart_start ')

$SNIPPET (' Pre_install_network_config ')

$SNIPPET (' Pre_anamon ')


%packages--ignoremissing

@core


%post

Adding an SSH key to authorized keys

$SNIPPET (' Adding_an_ssh_key ')

$SNIPPET (' Log_ks_post ')

$SNIPPET (' post_install_kernel_options ')

$SNIPPET (' Post_install_network_config ')

$SNIPPET (' Download_config_files ')

$SNIPPET (' Cobbler_register ')

$SNIPPET (' Post_anamon ')

$SNIPPET (' Kickstart_done ')



rm-rf/etc/yum.repos.d/*

Cat >/etc/yum.repos.d/puppet.repo <<-eof

[Base]

Name=base

Baseurl=http://10.240.216.250:8080/os-base.repo

Enabled=1

Gpgcheck=0

Priority=1


[Puppet]

Name=puppet

Baseurl=http://10.240.216.250:8080/puppet.repo

Enabled=1

priority=10

Gpgcheck=0


Eof


mkdir/root/.ssh/

chmod 700/root/.ssh/


Cat >/root/.ssh/config <<-eof

Stricthostkeychecking No

Userknownhostsfile/dev/null

Eof





Cat >/root/.ssh/id_rsa <<-eof

-----BEGIN RSA PRIVATE KEY-----

Miieoqibaakcaqea159xwlesqkxo7xm2in5gs//yxvox6h4pczjncgc53vt4i4di

H3sdns7g33wezkznjasuzuiflwb7xkpnchwmp2lpshy7majmtgfv3t4lo7w4zlhh

Igrynjbzpcfmglqhcazozgopgv/szpa0ydka82mo9escunzlouvfyejcke2g/tvl

Mmfigmte4bi3g6df8bnh+9g/l5id/fwt+fumjvx0gmwgd3q9xi984wjaqkqu+y60

Tt1s38p/5xa1+ly7jn8mgjehtrt//xa61g7n5qwd1z29hjobmt2kbvuwyzxxyjld

Kywcfirxpy7hursibhtemvgnaau/gd4xle7qlwibiwkcaqaypih7gfn1gwstninj

Waguk942vmdnxuaqpj4pxk/btzizmbn9meygl6sr0u2t64u0wxtk2mhh7ct01i9u

Rlkr0mpapq4uhkniaog2ukp5hbue5ydxmtnmap90lhdfkoduomdhflmliofc6ecm

Gm/htslargmjbvknpsyacfc0vxzj4zm1t/hq4ozsu23yfifutc6hm3nvm+hwmsfv

Wu9kllgu2pebovutmorcs9p4drfs+n9aaoa72irad7t6kyexu0o9tupzwcwcicto

h+ez9agmb2dzob2fxhl3gpitva065qgvc830u8rt68va8vtwqhn7wjqzcbolka++

0kmlaogbao8c5j74jmzkv79ougcmyf6jfya2cwkrbzmaxgs8ouufkkzrllzqxf5f

Zxd1yzm/xivfb5emeugc1v1mtr0gewfh3g52yihjvo2qhw5oj1qkrnlhsf1at5u3

0vuugn5azstfy/os66qtznfzzwuabbwco188+u1xubt7dfsmunfxaogbaobz2usl

Z57yw2xh+c7sg4pney+/vngxjnkn6www1ni9oct5lm3h6/4x0dda2w9mxubcpyid

Nofroesdkdbpwhly6drxavlu5tlavjgywmh1u4sjnnbvmp2o9udkwmccgxpxzolc

Kqflthbcwkxid0sub7rmotlxvpj/jwdb7fvbaogbaihn2zg6iw5clzpk6rnsm5jc

Azuk31k4fu/bhrwk+vtwnvszyk+ypr1jur0xgjgp7zjns6arag2ey5kmkr5wt9eg

Gxwq8id4ravvjs1axn4ubhjslpkfp48ma+xbl0vz0wcioeqgnspqo/yepz1ioyuz

5bdbnuc+bupy9girjxrbaogao1yxx1cmwnjvrifsgqspiesqou505xacks92iyjm

R6lyv0slhwx62vauohf9zcnddvnagisrrdmo4v0oamq7vwabmg6jnyd9mjotp/qu

U8zl7ugjhg4rzcwsytcqqydugcuz8tfnijuxubepexzkjgd4kl72roqsmwzjv/da

B0scgyawqu2sw2ohr5zcti5wztmsii5kcbtgchm8uimqhl0tgqni83lfkbauchar

Wi6lvvekfdkpjks1gica1jt7vqwdkjy211ut5snkv6wgkb5kkvczzrjmvcv77rh9

b80zldnivts8clqiqe/0dvwmeq5lnf9vdimkr6gz2cemysyzsa==

-----END RSA PRIVATE KEY-----

Eof


Cat >/root/.ssh/authorized_keys <<-eof

Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqea159xwlesqkxo7xm2in5gs// Yxvox6h4pczjncgc53vt4i4dih3sdns7g33wezkznjasuzuiflwb7xkpnchwmp2lpshy7majmtgfv3t4lo7w4zlhhigrynjbzpcfmglqhcazozgopgv /szpa0ydka82mo9escunzlouvfyejcke2g/tvlmmfigmte4bi3g6df8bnh+9g/l5id/fwt+fumjvx0gmwgd3q9xi984wjaqkqu+y60tt1s38p/ 5xa1+ly7jn8mgjehtrt//xa61g7n5qwd1z29hjobmt2kbvuwyzxxyjldkywcfirxpy7hursibhtemvgnaau/gd4xle7qlw== [Email Protected

Eof


chmod 600/root/.ssh/id_rsa

chmod 600/root/.ssh/authorized_keys


Yum Clean All


Yum Install Augeas puppet-y


This article is from the "zhanguo1110" blog, make sure to keep this source http://zhanguo1110.blog.51cto.com/5750817/1599063

SSH no password between all machines login KS file template

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.