In this tutorial, part of the getting started series, we explain step by step how to log in to your instance.
Prerequisites:
- Fuga Cloud Account
- A security group with SSH access
- Key Pair
- A running instance with a public IP address
Note: For most new images the username is the distribution name with lowercase, for example, Ubuntu 18.04 is ubuntu, and Fedora 27 would be fedora.
Connect to a Linux instance with an imported Key Pair
Open your terminal and type one of the following commands to connect to your instance. Which command you execute depends on the Linux distribution that you've picked.
- If your instance is Ubuntu:
ssh ubuntu@PUBLIC_IP
- If your instance is Ubuntu and you want to use a specific SSH key:
ssh -i .ssh/id_rsa ubuntu@PUBLIC_IP
- If your instance is CentOS:
ssh centos@PUBLIC_IP
- If your instance is Debian:
ssh debian@PUBLIC_IP
Note: When confronted with the following warning, you can select yes.
Connect to a Linux instance with a generated Key Pair
- Download your keypair (.pem) locally, for example to your .ssh folder.
- Open your Terminal.
- Navigate to your earlier stored .pem file.
- Run the following command to protect your key pair file. (Mandatory)
chmod 400 KEYPAIR_NAME.pem
5. You are now able to connect to your Linux instance with the following command:
- If your instance is Ubuntu:
ssh -i KEYPAIR_NAME.pem ubuntu@PUBLIC_IP
Other operating systems often use the name of the OS as the user account. For example: Connecting to Fedora and CentOS instances can be achieved by substituting 'ubuntu' user from the the command with 'fedora' or 'centos' respectively.
Conclusion
In this getting started series, consisting of 4 tutorials, we introduced you to the dashboard, security groups, key pairs, launching an instance, linking a public IP address and logging in to your instance. With this knowledge, you are ready to follow the other tutorials in the Fuga Cloud Academy.
If you have feedback about this getting started series, we would love to hear from you. For this, you can use the chat functionality at the bottom right of your window.
We wish you a lot of pleasure with all your future projects!