Python 3 remote Linux server executes commands and uploads and downloads files

1, Introduction Paramiko is based on SSH to connect to the remote server and perform relevant operations (SSHClient and SFTPClinet, i.e. remote connection, upload and download service). The module can be used to command or operate files on the remote server. It is worth mentioning that the internal remote management of fabric and ansible is rea ...

Posted on Wed, 03 Jun 2020 07:20:10 -0700 by joe1986

Rendering host file written by ansible role

The hosts file is usually used when deploying a distributed cluster. We usually write in the ip address and host name. How to implement rendering when writing Ansible?Define the roles first [root@ansible kubeadm-high-install]# ls ansible.cfg group_vars hosts roles site-all.yml The first file takes the default etc/ansible cfg file and remov ...

Posted on Wed, 27 May 2020 08:22:10 -0700 by elkidogz

Configure jenkins to publish php code

1, Add credentials to jenkins First select credentials > Global > Add credentials to select users and passwords or private keySelect private key mode 2, Install SSH Plugin plug-in When building in Jenkins, you may need to first SSH to a remote server to execute the necessary scripts, and then execute the build. At this point, you need to ...

Posted on Tue, 05 May 2020 11:28:50 -0700 by deception54

Install and use the automation tool Ansible in CentOS 7

Ansible is a free and open source configuration and automation tool developed for Unix like systems. It's written in Python, similar to Chef and Puppet, but with one difference and advantage, we don't need to install any clients in the node. It uses SSH to communicate with nodes. Step 1: install Ansible using yum rpm ...

Posted on Tue, 05 May 2020 08:45:37 -0700 by cneale

Build a fully distributed Hadoop2.6 environment under Centos7

1. Download the Hadoop package and JDK 1. Download Hadoop address: https://archive.apache.org/dist/hadoop/common/hadoop-2.6.4/hadoop-2.6.4.tar.gz2. Download jdk: Link: https://pan.baidu.com/s/1lbu7eBEtgjeGIi2bWthLnA Extraction code: 0j0j 2. Preparing virtual machines 1. Create a new virtual machine (Centos7) in VMware, which is omitted. 2. ...

Posted on Sat, 02 May 2020 21:01:08 -0700 by calavera

Public network virtual machine sshd anti brute force attack

Brute force bot attempts to use various user names and passwords to crack. For example, I found the following user names under / var/log/secure, and they try to use ssh to log in to my public virtual host. sed -n '/Jan 19/p' /var/log/secure | sed -n '/invalid user/p' | awk '{print $(NF-1)}' | sort | uniq 0 0101 1 ...

Posted on Fri, 01 May 2020 21:36:08 -0700 by bobbybrown

Solutions to mysql failure in CentOS 7.0 service startup

At noon, the company had a network problem (I didn't know the network problem at that time) and couldn't connect to SSH, so the server was forced to restart in Alibaba cloud's control panel. As a result, the mysql database couldn't be started, and an error was reported directly by running the mysql command Can't connect to local MySQL server t ...

Posted on Fri, 01 May 2020 08:02:04 -0700 by jlp09550

shell script 14: Enterprise case

14. Enterprise Actual Warfare Cases (1) Use the for loop to create 10 html files in batch in the / oldboy directory, where the file name contains 10 random lowercase letters to reinforce the fixed string 0ldoby. Idea analysis to generate random numbers: The core is to create 10 random lower case letters. Method 1: echo $RANDOM range is 0-32767 ...

Posted on Wed, 29 Apr 2020 09:37:56 -0700 by kparker

Jenkins and Svn Maven Ant for automatic deployment

For notes, so that it can be configured quickly later First of all, we need to deploy Maven and Ant to the server where Jenkins is located. I won't go into details here. The only thing we need to pay attention to is that the jar files of jdt will be used when running Ant, which needs to be put in lib in advance Jenkins ...

Posted on Tue, 14 Apr 2020 10:31:00 -0700 by aladiyat23

Which keys of SSH

Known Host Keys Prevent man in the middle attacks. https://www.ssh.com/ssh/host-key#known-host-keys SSH clients store host keys for hosts they have ever connected to. These stored host keys are called known host keys, and the collection is often called known hosts. In OpenSSH, the collection of known host keys is stored in /etc/ssh/known_ ...

Posted on Fri, 10 Apr 2020 08:13:37 -0700 by WanamakerMedia