SSH from linux
Connecting to a Linux Instance
You connect to a Linux instance using SSH.
To connect to a Linux instance from a Unix-style system-
Use the following command to set the file permissions so that only you can read the file:
-
chmod 400 <private_key_file>
<private_key_file> is the full path and name of the file that contains the private key associated with the instance you want to access.
-
Use the following SSH command to access the instance.
Note
Copy the following example to ensure the correct characters are used. If the wrong character is used in
Copy the following example to ensure the correct characters are used. If the wrong character is used in
ssh -i
, a Could not resolve hostname ...: No such host is known.
error might occur.ssh -i <private_key_file> <username>@<public-ip-address>
<private_key_file> is the full path and name of the file that contains the private key associated with the instance you want to access.
<username> is the default username for the instance. For Oracle Linux and CentOS images, the default username is opc
. For Ubuntu images, the default username is ubuntu
.
<public-ip-address> is your instance IP address that you retrieved from the Console.