Posts

Showing posts from 2016

Using ssh keys to login to VMs

1. first generate a public / private key pair using ssh-keygen     ssh-keygen -t rsa -b 4096 -C "ranjit"       - accept the prompts       - if needed, enter a filename - e.g rsa-mykey       - no need of passphrase    after the command executes, 2 files are generated:    rsa-mykey   - this is the private key file    rsa-mykey.pub  - this is the public key file  2.   store the public key file to authorized_keys  :e.g cp rsa-mykey.pub ~/.ssh/authorized_keys  3.   Use the private key file to login into the machine with tools like Putty  4.  Putty does not accept this private key file as it is in openssh ssh-2 format. So convert to putty        private  file format using puttygen        a)  open puttygen        b)  load the private key file        c)  then save the private key file  5.  Use the saved private key file (e.g .ppk) to login to the machine using Putty.

Accessing NATted VMs from Host machine using Port Forwarding

Usually when we create VMs in Virtualbox and select the Networking option as NAT,  the IPs assigned would be 10.0.2.0/24   - The IP address range for VMs can be managed by creating a NAT network in Virtualbox and specifying the IP range File->Preferences->Network   + new nat network.   Give the name and set the IP address range Then these IP addresses that are assigned to the launched VMs are not accessible from host. E.g. if host IP is 10.20.10.186 and VM IP is 10.0.2.15 , then you can ping 10.0.2.15 from 10.20.10.186, but the reverse is possible, i.e you can ping 10.20.10.186 from 10.0.2.15. so now to connect to the VMs through SSH, we need to enable and configure port forwarding in virtualbox. so go to File->Preferences->Network->NatNetwork (given name to the nat network). Then click on Port Forwarding and add rules for each VM E.g Rule 1    Protocol: TCP  Host IP: 127.0.0.1   Host Port: 2000   Destination IP: 10.0.2.15 Dest Port: 22 Rule 2    Protocol:

Amazon Scenario Questions

1.       You work for a automotive company which is migrating their production environment in to AWS. The company has 4 separate segments, Dev, Test, UAT & Production. They require each segment to be logically isolated from each other. What VPC configuration should you recommend? -           Create a separate VPC for each segment.  Then create VPN tunnels from your HQ to each VPC so that the appropriate teams can each speak to their dedicated VPC 2.       You are solutions architect working for a busy ecommerce store. Due to your organisations unique security requirements, you decide to utilize EC2 running a MySQL database, rather than using RDS. You need to architect this EC2 instance to maximise your disk IO. Which of the following would give you the best disk performance? -           Add 2 x additional Provisioned IOPS (PIOPS) SSD volumes and create a RAID 0 and install MySQL on this RAID 0. 3.        You are designing an AWS solution for a new customer and they wan