Monday, May 12, 2014

Generate SSH (.ppk) keys and connect user account with Putty on Windows

Step 1:  Download “puttygen.exe” and run to generate public/private ssh (.ppk) key file.

Step 2:  Launch the “puttygen” on windows, keep all default settings:



Step 3:  Now click on “Generate” button to create key.
               
Note: Move your mouse around within the blank space during the key generation process.

Step 4:  Once the generator is complete, you will see a windows with your new public key and key fingerprint:



Step 5: You can change the “Key comment” like hostname or any other remarks as you want

Step 6:  if you want, you can fill the “key passphrase” and “confirm passphrase” fields.

Step 7:  Select the contents of public key in that large text field and copy the entire content (CTRL+C) into clipboard.

Note:    Do not quit puttygen.exe at this time.

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAhCdDMhGHdaw1uj9MH2xCB4jktwIgm4Al7S8rxvovMJBAuFKkMDd0vW5gpurUAB0PEPkxh6QFoBNazvio7Q03f90tSP9qpJMGwZid9hJEElplW8p43D3DdxXykLays2M8V2viYGLbiXvAbOECzwD4IaviOpylX0PaFznSR4ssXd0= my-workstation-home

Step 8:  Now open up Notepad and paste (CTRL + V) the content into a new file. Save file with “.txt” extension, like publickey.txt.

Note: The public key is what will be put on your server.

Step 9:  Go back to PuttyGen and click on the “Save private key” button on the main window under the “Save the generated key” section. You can call that file “privatekey” or “privatekey.ppk”

Note: The private key remains private and should never be given to anyone. It does not go on your site account; it stays on your workstation.  Keep this file safe or else you will need to re-do everything if the private key is ever lost.

Step 10: Now you have a public and private key file saved on your workstation. You can quit out of PuTTYGen now.

Step 11: Login to site via SSH, you can install your public key: Category à Connection àSSH à Auth à click on browse button and find the private key generated previously and click the “Open” button to load it.

Step 12:  In Category section à select Session” à fill hostname / ip-address à click on “Open” button and then you will get prompt for username and password.

Step 13:  Type the following command at the prompt and press enter key:
                $ mkdir ~/.ssh; touch ~/.ssh/authorized_keys; chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys

Step 14: open the “authorized_keys” file in command line and use nano here:
$ nano ~/.ssh/authorized_keys

Note :  Once you have made your changes, you can exit “nano” by pressing “Ctrl+X”, then press “Y”, and finally “enter” to confirm the overwrite/filename.

Step 15:  After entering passphrase you should be logged into your account via SSH
Authenticating with public key "my-workstation-home"
Passphrase for key "my-workstation-home":



Monday, April 21, 2014

Could not open /dev/vmmon: No such file or directory. Please make sure that the kernel module `vmmon’ is loaded,

or,

Failed to open device “/dev/vmci”: No such file or directory. Please make sure that the kenel module ‘vmci’ is loaded. Module Device PowerOn power on failed

Solution:

Step 1)  Check current version & other details like:
o   Version: Workstation 6.5 virtual machine
o   Guest OS: Red Hat Enterprise Linux 5
o   Configuration files & Snapshot, etc.

Step 2)  Check current running process, Ram & Disk Status:
                # top
                # free –m
                # ps –ef | grep vmware

Step 3)  Check current loaded module for error:
                # lsmod | grep vm
                                Module vmmon loaded
Module vmnet not loaded
               
Step 4)  For rectifying the above issue runs command to load VM modules:
# /etc/init.d/vmware restart

Stopping VMware services:
   Virtual machine communication interface[  OK  ]
   Virtual machine monitor[  OK  ]
   Blocking file system[  OK  ]
Starting VMware services:
   Virtual machine monitor[  OK  ]
   Virtual machine communication interface[  OK  ]
   Blocking file system[  OK  ]
   Virtual ethernet[  OK  ]
   Shared Memory Available[  OK  ]

Step 5)  To start VMware services automatically while rebooting the server, run below command:
                 
# chkconfig --list | grep vm
vmware         0:off             1:off      2:off      3:off      4:off      5:off      6:off

# chkconfig vmware on

# chkconfig vmware on--list | grep vm
vmware         0:off             1:off      2:on       3:on       4:on       5:on       6:off

Step 6)  Now check current running processes:
                # top
                # ps –ef | grep vmware