registry easy keygen
In this article I will explain how to configure Linux 2 servers automatically synchronize data between a specific directory on each server. To this we will use authentication, rsync ssh keys, and a cron job.
Call the 2 servers DESTSERVER SourceServer "and" to
SourceServer = source server (the server that connects to load the data)
DESTSERVER = destination server (the server that connects to receive data)
Part 1 – Setting up SSH key authentication
Prime Instead, make sure the DESTSERVER has the ability to use key authentication enabled. Find your configuration file for sshd (usually '/ Etc / ssh / sshd_config') and enable these options if they are already established.
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile. Ssh / authorized_keys
If you edit the file remember to restart sshd after.
# / Etc / init.d / sshd restart
Next on the SourceServer we create the public / private key that is used for authentication with the following command.
# Ssh-keygen-t rsa
* Note: Do not enter a password for it, just press Enter when you prompted.
This should create 2 files, an archive of public key and private key.
The public key file (usually [homedir] /. Ssh / id_rsa.pub), we get DESTSERVER.
The private key file (usually [homedir] /. Ssh / id_rsa) we will continue in the SourceServer.
* Be sure to keep the key private and secure. With it, nobody will be able to connect to that DESTSERVER contains the public key.
Now to install the public key that we created for DESTSERVER.
Select the account user that you use to connect to DESTSERVER, Husk call this person, "for now.
In the home directory, create a sub-directory. "Hush," and in this folder, create a new text file called 'authorized_keys'. If there is, great format, use the existing file.
Open the file authorized_keys' and paste the contents of the public key that you created in step Previous (id_rsa.pub). It should be something like the following
ssh-rsa
Save the file and change the permissions to 600 for file and 700 for ssh '. "Directory.
Now, to prove that the function keys.
From SourceServer try to connect as normal using ssh DESTSERVER.
# Husk ssh @ DESTSERVER
If all does not prompted for a password, but connects directly to a shell DESTSERVER.
The guidelines recommend more Visit href = "http://www.howtomonster.com"> www.howtomonster.com
Part 2 – Create the script rsync
Now for the rsync script.
I use a simple script as follows
——————————————-
# / Bin / bash
SourcePath = '/ source / directory'
DestPath = '/ target'
123,123,123 DestHost = '123 '
Husk = 'Remember'
LOGFILE = 'rsync.log'
echo $ 'NN'>> $ LOGFILE
rsync – rsh = ssh av Husk SourcePath @ $ $ $ DestHost: $ DestPath 2> & 1>> $ LOGFILE
echo "Completed to: `/ bin / date` ">> $ LOGFILE
——————————————-
Copy this file in the startup the sourceuser SourceServer
First 4 and change variables in the file.
SourcePath (source path to synchronize)
DestPath (target path for be synchronized)
DestHost (Destination IP address or host name)
Straw (user on the target server)
Save as something like 'rsync.sh'
Set permissions on the file to 700.
Rsync.sh # chmod 700
You should now be able to run the script, you must log in DESTSERVER, and transfer files all without their interaction.
The script will send all output to the "rsync.log 'file specified in the script.
Part 3 – Setting up cron job
Assuming everything has worked until now all that remains is to create a cron job script to run automatically at intervals predefined.
As sourceuser even use the command "crontab" to create a cron job again.
# Crontab-e
This opens an editor where you can schedule the work.
Type the following line to have the Run command sequence per hour
——————————————-
# Run my script rsync every hour
0 * * * * / path / To / rsync.sh
——————————————-
Your 2 servers now be synchronized once the directory selected all hours.
I hope this has helped me know if you have any questions.

0 Responses to “registry easy keygen”