Monday, July 27, 2015

Ubuntu commands


  1. When following messages are seen when logged into Ubuntu:

88 packages can be updated.
80 updates are security updates
Run the following commands to update the packages:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot - If necessary

Saturday, July 25, 2015

AWS - puTTY Setup, tunneling to VNC Viewer - Install Django

Connection through putty

  1. Download puTTy and puTTygen from puTTy download page
  2. Convert .pem to .ppk which puTTy understand
    1. Start puTTygen
    2. Select SSH-2 RSA under "Type of key to generate"
    3. Click load, locate the .pem file [ Select the option to display 'All files (*.*)' ]
    4. Click "Save private key"
    5. Specify the same name for the key that was used for the key pair. PuTTy automatically adds the .ppk file extension
  3. Start puTTy
  4. In Category pane,
    1. select session
    2. In 'Host Name' enter user_name@public_dns_name for ubuntu it is 'ubuntu'
    3. Select SSH under Connection type
    4. Port is 22
    5. In the Category pane, expand Connection, expand SSH, and then select Auth
      1. Click Browse
      2. Select .ppk file and then click Open
      3. If you plan to start this session again later, you can save the session information for future use. Select Session in the Category tree, enter a name for the session in Saved Sessions, and then click Save.
      4. Click Open to start the PuTTY session

Connect VNC

  1. Follow the steps at link
  2. Load the above session by clicking Category->Session->select the session under 'Saved session' -> Load
  3. In Category pane, expand SSH, select X11, check Enable X11 Forwarding
  4. Select Tunnels from Category pane, Enter these values:
    1. Source port: 5900
    2. hostname:port_number
    3. To determine the destination port, use the number (#) you were given in the vncserver command above and add it to 5900. For example, if your server is running on :1, use hostname:5901
    4. Click Add
  5. Save the session: Category->Session->select the session under 'Saved session' -> Save
  6. Open VNC Viewer
    1. VNC server: localhost
    2. Click OK