In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Scp remote backup
Host A
1. Log in with oracle: 192.17.28.5
two。 Produce public and private: id_rsa is private, id_rsa.pub is public.
Cd / home/oracle/.ssh-make sure that the .ssh file is corrupted, other users or groups do not have W write permission, otherwise it will be invalid.
[oracle@ytdbbackup .ssh] $ssh-keygen-t rsa-if prompted to reply by default, OK
3. Control the public license to the IP host that needs no password.
And write id_rsa.pub to the authorized_keys file of the: / home/oracle/.ssh directory of the IP host:
[oracle@ytdbbackup .ssh] $ssh-copy-id-I id_rsa.pub oracle@192.17.28.2
B host
1. Log in with oracle: 192.17.28.2
Cd / home/oracle/.ssh
two。 The right has been changed to only users and cannot be written. Note: password-free login is invalid if the authorized_keys file can be disabled.
Chmod 400 authorized_keys
3. Check the permission, only use the previous permission to have the right.
Ls-lth
A host:
1.oracle is registered with registration.
2.sh file creation:
Touch scp.sh
Vi scp.sh
Enter:
Scp-r oracle@192.17.28.2:/data/backup/backup_tfj_rman / data/backup/
Scp-r oracle@192.17.28.2:/data/backup/archive_jxdb / data/backup/
3. Schedule: crontab-e
After the rman copy, Monday, 2nd, 4th, 6th, the rman file.
58 03 * * 1, 2, 4, 6 sh / data/backup/backup_tfj_rman/scp.sh
Host B scheduling: crontab-e
-- 20:30rman schedule on Monday, Wednesday, Friday, evening
30 20 * * 1, 3, 5, 7 sh / data/backup/backup_tfj_rman/rman_job.sh
An as a client, to achieve password-free public key authentication, when connecting to server B
You need to generate a key pair on A, including a public key and a private key, and then copy the public key to all Slave.
When A connects to B through SSH, B generates a random number, encrypts it with A's public key, and sends it to A.
After receiving the encryption number, A decrypts it with the private key, and sends the decryption number back to Slave,Slave to confirm that the decryption number is correct, and then allows A to connect.
This is a public key authentication process, during which the user does not need to enter the password manually.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.