- Connection from AppTier ( Public Subnet ) to DBTier (Private Subnet)
- Create Pre -Authenticated Request
- Login to app tier instance public subnet
[opc@appvm ~]$ mkdir dbtier1_key
[opc@appvm ~]$ cd dbtier1_key
[opc@appvm dbtier1_key]$ pwd
/home/opc/dbtier1_key
[opc@appvm dbtier1_key]$
- Download the private key file into the keys subdirectory /home/opc/dbtier1_key
[opc@appvm dbtier1_key]$ wget https://objectstorage.ap-mumbai-1.oraclecloud.com/p/DK-PWGjxeY9XthOioCZIRO7ijKkT3ANVDkc9SsdpCs7fn4YOBuN7olL6TCME4i0/n/bmdsoh48o0kf/b/bucket-20210415-1806/o/dbtier_private_keydb_ssh-key-2021-06-28.key.key
--2021-06-28 13:07:08-- https://objectstorage.ap-mumbai-1.oraclecloud.com/p/DK-PWGjxeY9XthOioCZIRO7i-jKkT3ANVDkc9SsdpCs7fn4YOBuN7olL6TCME4i0/n/bmdsoh48o0kf/b/bucket-20210415-1806/o/dbtier_private_keydb_ssh-key-2021-06-28.key.key
Resolving objectstorage.ap-mumbai-1.oraclecloud.com (objectstorage.ap-mumbai-1.oraclecloud.com)... 134.70.76.3
Connecting to objectstorage.ap-mumbai-1.oraclecloud.com (objectstorage.ap-mumbai-1.oraclecloud.com)|134.70.76.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1679 (1.6K) [application/octet-stream]
Saving to: ‘dbtier_private_keydb_ssh-key-2021-06-28.key.key’
100%[=============================================================================================================================>] 1,679 --.-K/s in 0s
2021-06-28 13:07:08 (270 MB/s) - ‘dbtier_private_keydb_ssh-key-2021-06-28.key.key’ saved [1679/1679]
[opc@appvm dbtier1_key]$ ll
total 4
-rw-rw-r--. 1 opc opc 1679 Jun 28 13:01 dbtier_private_keydb_ssh-key-2021-06-28.key.key
[opc@appvm dbtier1_key]$
- Change key permission to chmod 600
[opc@appvm dbtier1_key]$ chmod 600 dbtier_private_keydb_ssh-key-2021-06-28.key.key
[opc@appvm dbtier1_key]$ ll
total 4
-rw-------. 1 opc opc 1679 Jun 28 13:01 dbtier_private_keydb_ssh-key-2021-06-28.key.key
[opc@appvm dbtier1_key]$
[opc@appvm dbtier1_key]$ hostname
appvm
- Login dbtier instance private subnet from public subnet using downloaded key
[opc@appvm dbtier1_key]$ ssh -i dbtier_private_keydb_ssh-key-2021-06-28.key.key opc@10.0.2.118
Last login: Mon Jun 28 13:01:53 2021
Welcome to Autonomous Linux
Effective kernel version is 5.4.17-2102.201.3.el7uek.x86_64
Please add OCI notification service topic OCID with
$ sudo al-config -T [topic OCID]
[opc@dbvm1 ~]$ hostname
dbvm1
[opc@dbvm1 ~]$
[opc@dbvm1 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.2.118 dbvm1.dbtier1.varunvcn.oraclevcn.com dbvm1
[opc@dbvm1 ~]$
No comments:
Post a Comment