Here is an issue hit by one of our trainees from OracleCloud certification (1Zo-160) course. He was trying to copy a file from the on-premise database to Cloud instance but it was failing with error Permission denied. So let me walk you through the issue and the fix.
Before proceeding further, let me first walk you through the different ways to connect to Oracle cloud instance. You can connect to Oracle Cloud instance using below three methods.
SSH: You can connect to your cloud instance using SSH keys (Private and Public Keys) and Port 22. You have to generate Private and Public key pair (using PuttyGen) on your local PC and then create one cloud instance using that Public key. Then connect to the Cloud instance using private key (via Putty) and SSH Port 22.
IPSec VPN: You can set up a VPN connection to establish a secure communication channel between your data center and your cloud instance. You can use either a supported third-party VPN device or Corente Services Gateway (an Oracle-provided IPsec solution) installed on a host.
Fast Connect: This option allows you to access your instances through a direct connection from your on-premises. Transferring data over a direct connection provides better privacy and ensures consistent performance with dedicated bandwidth and controlled latency in your network traffic.
Now let’s look into the issue that trainee was hitting.
Issue:
Trainee was using first method that is SSH to connect to Cloud instance. He was trying to copy a file from on-premise database to cloud instance using scp command as shown below.
The trainee was using the extension “.ppk” for private key while Copying the file. Extension “.ppk” is only for windows and putty but if you do scp you need open ssh format.
Fix:
Please make sure to follow below points before copying on Cloud instance:
1. We need to convert the private key (.ppk) file as it will not work on Linux. We will use this converted open ssh file while copying the data on cloud from source. Steps to concert private file via puttygen are below
Open Puttygen and click on conversion and Importfile to import your private file.
Click on conversions and then Export OpenSSH Key.
Now give any name to the file without any Extension and select All Files(*) under save as and save the file.
2. After copying converted open ssh file on your server, give permission 600 to the file before running scp command.
If you want to learn more about Oracle Cloud and troubleshooting like above then check our Oracle Database Cloud Service (DBCS) Certification (1Z0-160), where we cover each and every topic required to clear your 1z0-160 certification with both a theoretical and practical approach.
Related/Further Reading
If you are just starting out in Cloud then I highly recommend you to go through these posts first
Do you want to Move Ahead in your Oracle Cloud Journey?
NO! So your next task is to get yourself to register for our FREE Webinar on Learn How To Build Your First Database On Cloud (PaaS) to start your cloud journey. Click on the image below to register for FREE.
I started my IT career in 2000 as an Oracle DBA/Apps DBA. The first few years were tough (<$100/month), with very little growth.
In 2004, I moved to the UK. After working really hard, I landed a job that paid me £2700 per month.
In February 2005, I saw a job that was £450 per day, which was nearly 4 times of my then salary.