Puppet bulk Modify SSH port-linux software distribution

Source: Internet
Author: User
Tags ssh port
SSH by default using the Tcp22 port, in order to protect the Linux 22-side xxx break, we sometimes need to change the port of SSH, however, in the enterprise environment, the number of servers is huge, one can imagine the workload modification. The use of puppet can be a good solution to such problems, for operations and maintenance personnel to alleviate the burden of work.
The case topologies are as follows:

Puppetclient is the Linux server that needs to modify the SSH port
1.
1) puppetmaster should create the following directory, puppet run user puppet should be the owner of the directory

2)/etc/puppet/modules/ssh/manifests/configuration on each configuration file
Install.pp

Config.pp

Service.pp

Init.pp

3) configuration of/etc/puppet/modules/ssh/files/ssh/sshd_config (modify port)

4) Configuration of/ETC/PUPPET/MANIFESTS/NODES/SSH.PP

#添加两个SSH节点的主机名
5) Configuration of/ETC/PUPPET/MANIFESTS/SITE.PP

Complete the above configuration to restart the puppetmaster service
2, the configuration on each node
/etc/puppet/auth.conf
Add "Listen = True" at the end
/etc/puppet/puppet.conf
At the end, add "Allow ' Master IP address '"
Complete the above configuration restart Puppetclient service
3. Puppet command
Puppet kick hostname (Operation push on Master)
Puppet Agent-t (active pull on client)

Puppet bulk Modify SSH port-linux software distribution

Related Article

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.