# Accessing a virtual device from SSH

# With SSH client

You will need to generate and import/attach a SSH key pair to your instance in order to use SSH. For more information on SSH usage, please refer to this page(opens new window)

# Generate a SSH key pair

# With SSH client

Use command ssh-keygen -t rsa -b 4096 -f key.pem on the computer you wish to connect from. This will generate a private key named key.pem and a public key named key.pem.pub in the current folder. You will then need to import your public key (see Importing SSH key pair) and use your private key to connect (see Connecting to your Virtual Device with SSH).

# With platform tools

# Import a SSH key pair

# Connect to your Virtual Device with SSH

Use the command ssh -i key.pem [email protected]_IP


Please note that shell is a specific user for operations with ssh. You won’t be able to connect to Genymotion instances with a different user name.

# With PuTTY (Windows)

# Prerequistes

You have to download and install PuTTY and PuTTYgen from here(opens new window) . You can either download a package with all tools or download PuTTY and PuTTYgen separately.

# Generate a SSH key pair

You will need to generate a ssh key pair in order to connect to your instance with PuTTY

  • AWS
    Generate a key pair as explained in Creating a Key Pair Using Amazon EC2(opens new window) . You will then need to convert it with PuTTYgen: Converting Your Private Key Using PuTTYgen(opens new window)
  • Alibaba
    Generate a key pair as explained in Create an SSH key pair(opens new window) . The process to convert the key to PuTTY format is exactly the same as AWS, see Converting Your Private Key Using PuTTYgen(opens new window)
  • GCP and Azure
    1. Run PuTTYgen. A window opens where you can configure your key-generation settings.
    2. Click Generate and follow the on-screen instructions to generate a new key. For most cases, the default parameters are fine, but you must generate keys with at least 2048 bits. When you are done generating the key, the tool displays your public key value.
    3. In the Key comment section, replace the existing text with the username of the user for whom you will apply the key.
    4. Optionally, you can enter a Key passphrase to protect your key.
    5. Click Save private key to write your private key to a file with a .ppk extension.
    6. Click Save public key to write your public key to a file for later use. Keep the PuTTYgen window open for now.

# Import SSH Key pair to your instances

# AWS and Alibaba

There is nothing to do here ; using AWS/Alibaba built-in tools to create a key pair will automatically generate a public key on the EC2 platform.


From the open PuTTYgen window, you will need to copy the content of the generated public key:
Puttygen key generator
And paste the content to create a new key pair. Please follow instructions from Editing public SSH key metadata(opens new window)

# Azure

You need to import the SSH public key when creating a new virtual machine. See Azure Quick start. From the open PuTTYgen window, you will need to copy the content of the generated public key and paste it in the SSH public key field:
Puttygen key generator

# Connect to the instance

In the Category pane, choose Session and complete the following fields:

  1. In the Host Name box, enter [email protected]_ip where instance_ip is your instance public IP. PuTTY login
  2. Under Connection type, select SSH
  3. Ensure that Port is 22
  4. In the Category pane, expand Connection, expand SSH, and then choose Auth. PuTTY configuration
    Complete the following:
    1. Choose Browse
    2. Select the .ppk file that you generated for your key pair with PuTTYgen
    3. (Optional) If you plan to start this session again later, you can save the session information for future use. Choose Session in the Category tree, enter a name for the session in Saved Sessions, and then choose Save
  5. Choose Open to start the PuTTY session If this is the first time you have connected to this instance, PuTTY displays a security alert dialog box that asks whether you trust the host you are connecting to.
  6. Choose Yes. A window opens and you are connected to your instance