Deploying Hypersocket VM in Amazon EC2

In the Amazon EC2 console, click the Launch Instance button.

 

Click on Community AMIs on the left hand side then search for: hypersocket, then select the Hypersocket product you want to use.

Click the Select button on the right hand side.

 

Select the instance type you want to use, then click Next: Configure Instance Details.

 

Next select the networking, public IP etc that you want to use and click Review and Launch (or optionally you can click Next to manually alter the storage details and tags).

 

 

In the Security Groups section, click Edit security groups, check that you have a rule for SSH on port 22 and add a new rule for HTTPS on port 443.

Click Launch.

 

Select an existing keypair or generate a new one, then click Launch Instances.

Your instance will now launch.

 

 

Connecting to your VM

You can see your new VM in the EC2 web console (URL varies according to location but an example for west europe is https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-1#Instances:)

Your new VM may not have a name yet, so hover over the Name field and click the edit icon (a pencil) and enter a new name.

You can see the public DNS name and IP of the virtual machine from this view.

 

 

Web UI

You should be able to use a web browser to connect to this DNS name or IP using https://<host>.

As this is the first time you have accessed the server, it should display the Setup Wizard. Follow this wizard to complete the initial setup of the server.

 

Once the wizard has completed, you can now log on to the server and start to configure your users and resources.

 

SSH access

Using an SSH client of your choice you can also connect to the server over SSH. Amazon instances only accept key authentication so we will need the private key you used or generated whilst creating the VM.

For this example, we will use PuTTY for Windows.

We first need to convert the private key into one that PuTTY can use. For this, we run the program puttygen.

Click Load, change the filename dropdown so that it reads All Files (*.*) then find and select the private key file (.pem file) that you created and downloaded from EC2.

Optional (but recommended): Enter a key passphrase and confirm.

Now click Save private key and save the resulting .ppk file somewhere safe.

 

Start PuTTY and enter the hostname for the VM.

On the left side, expand Connection->SSH and click on Auth. Next to Private key file for authentication, click on Browse and select the ppk file already saved above.

Click on Open to connect to the SSH session.

 

When you are prompted for a username, you need to enter the product name, so in the case of the VPN, the user is hypersocket-one.

As we had set a password on the key, the client next prompts for the key password. When we enter the password, the login completes and we have access to the server.

 

 

VMConsole

Hypersocket products on Virtual Machines include a UI running on the console called VMCentre. This tool can be used to change the networking, monitor the service, get access to the logs and open a support tunnel.

On a cloud based VM you do not have access to this console, so VMCentre is available to connect to via VNC. However, this VNC port is not externally accessible for security reasons but you can use an SSH client to tunnel to the console.

First however, we need to set a password for the hypersocket-one account. To do this, connect via SSH as per above and run the following command: sudo passwd hypersocket-one.

You will be prompted to type in a new password and confirm that password.

Now, back the VNC connection. On a Windows client you might want to use PuTTY to tunnel to the VNC port.

Start a new session and put in the hostname for the VM. Enter the private key details as mentioned in the SSH section above.

 

Now navigate on the left side to Connection->SSH and click on Tunnels.

In Source port, type in the port that SSH will set up on your client machine, here we will use 5900 as we don't have a VNC server on our client.

For Destination, type in localhost:5900 and click the Add button.

Click Open to start the session and log in with your SSH credentials.
Now whilst the SSH session is running, a tunnel should also be connected.

 

Using a VNC client of your choice (here we are using UltraVNC), connect to localhost::5900

 

You will then be prompted for a password, type in the root password and click Login.

You are now presented with the VMConsole display.

 

Have more questions? Submit a request

Comments