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
Generating SSH key pair
Using platform tools
- AWS: Creating a Key Pair Using Amazon EC2
- Alibaba: Create an SSH key pair
- GCP: GCP does not offer any SSH key pair generator, you will need to use ssh cli for this (see below)
Using SSH client
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).
Importing SSH key pair
- AWS: Please refer to Importing Your Own Public Key to Amazon EC2
- Alibaba: Please refer to Import an SSH key pair and Attach an SSH key pair
- GCP: Please refer to Editing public SSH key metadata
Connecting 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)
You have to download and install PuTTY and PuTTYgen from here. You can either download a package with all tools or download PuTTY and PuTTYgen separately.
Generating SSH key pair
You will need to generate a ssh key pair in order to connect to your instance with PuTTY
Generate a key pair as explained in Creating a Key Pair Using Amazon EC2. You will then need to convert it with PuTTYgen: Converting Your Private Key Using PuTTYgen
Generate a key pair as explained in Create an SSH key pair. The process to convert the key to PuTTY format is exactly the same as AWS, see Converting Your Private Key Using PuTTYgen
GCP does not offer any built-in tools to create key pairs, you will need to use PuTTYgen.
- Run PuTTYgen. A window opens where you can configure your key-generation settings.
- 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.
- In the Key comment section, replace the existing text with the username of the user for whom you will apply the key.
- Optionally, you can enter a Key passphrase to protect your key.
- Click Save private key to write your private key to a file with a
- 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:
And paste the content to create a new key pair. Please follow instructions from Editing public SSH key metadata
Connect to the instance
In the Category pane, choose Session and complete the following fields:
- In the Host Name box, enter
[email protected]_ipwhere instance_ip is your instance public IP.
- Under Connection type, select SSH
- Ensure that Port is 22
- In the Category pane, expand Connection, expand SSH, and then choose Auth.
Complete the following:
- Choose Browse
- Select the
.ppkfile that you generated for your key pair with PuTTYgen
- (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
- 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.
- Choose Yes. A window opens and you are connected to your instance