Oracle Cloud with WebLogic and ATP database - Configure ssh connection with Putty on Windows and MAC
Now is time to add our ssh key into the pageant, you can download from the following link
- https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Open pageant and load private key

Add opc@<public IP of the instance - VM Server) e.g. opc@130.0.0.0

Go to Auth options, please set up all as described in order to be able to pass authentication via pageant with preloaded key

Go to X11 and click on Enable X11 Forwarding - add there <:0.0>, also you can keep empty :)
Click on Open in order to start the connection to Linux VM Server

Confirm Security alert with - YES

:))) Great!!!!! now you are connected to Linux VM Server

MAC
Create directory - Oracle_key and go inside in the newly created directory
Krasimirs-MacBook-Pro:~ kkovachki$ mkdir oracle_key Krasimirs-MacBook-Pro:~ kkovachki$ cd oracle_key |
Copy all keys from Downloads to the newly created directory
Krasimirs-MacBook-Pro:oracle_key kkovachki$ cp ~/Downloads/ssh-key/* .

This is the list of keys


You need to change permission to 600 chmod 600 ora_test*


Make ssh connection by using the switch -i in order to load the ley ora_test - e.g. ssh -i ora_test opc@130.xxx.xxx.xxx

Now you have to adapt the configuration of ssh in order to enable X11 forwarding etc.
Add the below configiration in /etc/ssh/sshd_config
echo "AddressFamily inet" >> /etc/ssh/sshd_config
echo "X11DisplayOffset 10" >> /etc/ssh/sshd_config
echo "X11UseLocalhost yes" >> /etc/ssh/sshd_config
Restart SSHD service
[root@linux-vm ~]# systemctl restart sshd [root@linux-vm ~]# systemctl status sshd ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2020-01-18 15:30:41 GMT; 7s ago Docs: man:sshd(8) man:sshd_config(5) Main PID: 32581 (sshd) CGroup: /system.slice/sshd.service └─32581 /usr/sbin/sshd -D Jan 18 15:30:41 linux-vm systemd[1]: Starting OpenSSH server daemon... Jan 18 15:30:41 linux-vm sshd[32581]: Server listening on 0.0.0.0 port 22. Jan 18 15:30:41 linux-vm sshd[32581]: Server listening on :: port 22. Jan 18 15:30:41 linux-vm systemd[1]: Started OpenSSH server daemon. |
You can modify /root/.ssh/authorized_keys temporary if you need to connect with root and you need X11 forwarding
[root@linux-vm .ssh]# cat authorized_keys
Remove all in RED
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"opc\" rather than the user \"root\".';echo;sleep 10" ssh-rsa XXXXX"
Now you should install xauth and xterm
[root@linux-vm ~]# yum install xauth [root@linux-vm ~]# yum install xterm |
initiate SSH connection with X11forwarding with switch -Y
Krasimirs-MacBook-Pro:oracle_key kkovachki$ ssh -Y -i ora_test opc@130XXX.XXX.XXX Warning: No xauth data; using fake authentication data for X11 forwarding. Last login: Sat Jan 18 15:39:20 2020 from /usr/bin/xauth: file /home/opc/.Xauthority does not exist [opc@linux-vm ~]$ ---- check Magic Cookie [opc@linux-vm ~]$ xauth list linux-vm/unix:10 MIT-MAGIC-COOKIE-1 a7844c66435f6583e9d792f17f776ad0 [opc@linux-vm ~]$ |
Run xterm to test X11 forwarding

If you have the same "xterm" terminal window, this means that you are ready for the next step