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](https://cdn.bifiv.com/wp-content/uploads/2020/02/29c0e-20200224192531-e17b3.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/7a221-20200224192533-51932.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/4439f-20200224192534-55eee.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/9bce2-20200224192535-7d1b8.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
Step 7: Restart the instance.
![Picture [5] - Oracle crack SSH key problem - Rich Magazine](https://cdn.bifiv.com/wp-content/uploads/2020/02/ca5e8-20200224192537-92665.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/b5f15-20200224192538-ee84f.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/253b8-20200224192539-cd0e1.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
![Picture [8] - Oracle crack SSH key problem - Rich Magazine](https://cdn.bifiv.com/wp-content/uploads/2020/02/690ba-20200224192541-ea00d.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/ba02d-20200224192542-32c7f.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
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](https://cdn.bifiv.com/wp-content/uploads/2020/02/cd17b-20200224192543-d79a4.png?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
After waiting for the instance to bootstrap, you can use the new private key to connect to the instance.