Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Oracle Cloud Oracle free vps one-click automatic exercise (keep alive script)

 The Oracle Cloud keep-alive script starts at 0:00 every day and makes the CPU automatically exercise for 600 seconds every 3 hours, 8 times a day for a total of 80 minutes (load 10% to 20%), and the CPU utilization is greater than 10% for 5% of the time (at least 72 minutes a day) ), the amount of exercise can be adjusted according to your own situation. Meet the amount of exercise to avoid oracle free vps from being deleted.

One-click workout:

#amdversion
cd /root && wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/lookbusy -O lookbusy && chmod +x lookbusy && sudo echo "0 */3 * * * root timeout 600 /root/lookbusy -c 10-20 -r curve" >> /etc/crontab && grep -q centos /etc/os-release && service crond restart || service cron restart

#ARM version
cd /root && wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/lookbusy-arm -O lookbusy && chmod +x lookbusy && sudo echo "0 */3 * * * root timeout 600 /root/lookbusy -c 10-20 -r curve" >> /etc/crontab && grep -q centos /etc/os-release && service crond restart || service cron restart


Check the execution log:

cat /var/log/cron | grabbed lookbusy


One-click uninstall:

sed -i "/lookbusy/d" /etc/crontab && rm -f /root/lookbusy && grep -q centos /etc/os-release && service crond restart || service cron restart

Picture [1]-Oracle Cloud Oracle free vps one-click automatic exercise (keep-alive script)-Rich Miscellaneous

Pagoda exercise:
If you use pagoda timing tasks, you don’t need to read the previous ones. The steps are as follows:
1. Execute the following command in the shell to download lookbusy to the root path

cd /root && wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/lookbusy -O lookbusy && chmod +x lookbusy

Configure the pagoda timing task as shown in the figure below, and the script content is

timeout 600 /root/lookbusy -c 10-20 -r curve
Picture [2]-Oracle Cloud Oracle free vps one-click automatic exercise (keep-alive script)-Rich Miscellaneous

3. In the lower right corner of the scheduled task, you can test the execution and view the execution log, which is very intuitive and easy to use

Oracle crack SSH key problem

 This post will teach you the second method to solve the SSH key problem.

Step 1: Prepare a linux server directly, (any one, this is not difficult for MJJ)
Step 2: Link your own linux server (under root authority), enter the cd/root/ .ssh directory
Step 3 : Execute the ssh -keygen -t rsa command (enter all the way)
Picture [1] - Oracle crack SSH key problem - Rich Magazine
Step 4: Get the key generated just now, execute the command cat id_rsa.pub (if you follow my way to enter)
Picture [2] - Oracle crack SSH key problem - Rich Magazine
Step 5: Go to oralce A workbench is added to the instance details page, and the key is only generated after entering it.
Picture [3] - Oracle crack SSH key problem - Rich Magazine
Once the console connection is active, click "Connect using SSH" and copy the command to linux for execution.
Step 6: Successfully connect to the instance.
Picture [4] - Oracle crack SSH key problem - Rich Magazine
Step 7: Restart the instance.
Picture [5] - Oracle crack SSH key problem - Rich Magazine
Step 8: After rebooting we go back to the linux server and we will see the following echo, select the kernel and click "E" to edit the kernel to run with a bash prompt.
Picture [6] - Oracle crack SSH key problem - Rich Magazine
Step 9: Edit the kernel with rw init=/bin/bash and press ctrl+x, it will land at the bash prompt. As shown below (there is a space before rw)
Picture [7] - Oracle crack SSH key problem - Rich Magazine
Picture [8] - Oracle crack SSH key problem - Rich Magazine
Step 10: Execute the following command and update the new public key generated by PUTTYGEN to authorized_keys
Command 1: /usr/sbin/load_policy -i
Command 2: /bin/mount -o remount, rw/
command 3: cd ~opc/.ssh
command 4: pwd
Picture [9] - Oracle crack SSH key problem - Rich Magazine
Step 11: Copy the new key to the authorized_keys file and save it.
Use the command: vi authorized_keys
Step 12: Change the ownership and permissions of the authorized_keys file and reboot the system.
Picture [10]-Oracle cracking SSH key problem-Rich Magazine
After waiting for the instance to bootstrap, you can use the new private key to connect to the instance.