How to log in to your instance (4/4)

In this tutorial, part of the getting started series, we explain step by step how to log in to your instance.

Prerequisites:

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.

 

Screenshot 2019-06-05 at 17.03.27

Connect to a Linux instance with a generated Key Pair

  1. Download your keypair (.pem) locally, for example to your .ssh folder.
  2. Open your Terminal.
  3. Browse to your earlier stored .pem file.
  4. Run the following command to protect your key pair file.
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

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!