-
Notifications
You must be signed in to change notification settings - Fork 3
3. Connect to the compute instance
To connect to the deployed compute instance, you need to save the private SSH key that was created during the deployment.
This key is hidden and can be found in the "Job resources" of the Resource Manager's Stack details of the apply job:
Copy the key and paste it into a file on your disk. You need to fix the key by removing the enclosing double quotes and replacing all the '\n' with a real carriage return, using, for example, the command :1,$s/\\n/\r/g on Vi:
Then you can change the file permissions to 600.
You can then connect to the compute instance using the key, the opc user and the public IP:
You are now connected to the compute instance.
Recently, when deploying a stack, there is a new tab with information on how to connect to the deployed compute instance:
You can select the content of the key and paste it into a file as previously, and we need to replace the blank spaces like this:
In Vim, I use the command:
:s/\v^(\S+ ){3}\zs.*\ze( \S+){3}$/\=substitute(submatch(0), ' ', "\r", 'g')/
You can also check this video: