Sunday, June 14, 2015

What is running behind svchost?

Go to cmd and issue the command

tasklist /svc /fi "IMAGENAME eq svchost.exe

Sunday, May 24, 2015

How to setup SSH access between Host and VirtualBox Guest VMs

1. Make sure you have SSH server running in your VM

For example in my Ubuntu
sgeevar@ubuntu-ws:~/share$ service ssh status
ssh start/running, process 1157

If you do not have it, install using:
sudo apt-get install openssh-server

2. Power off your VMs and go to VirtualBox
File > Preferences > Network > Host-only Networks

See if you already have an entry, if not create one.

3. Open your VMs settings
Settings > Network > Adapter 2

Check Enable Network Adapter
Attacked to: Host-only Adapter
(The entry you saw in step 2 will be automatically assigned to Name)

Save the changes and exit

4. Now open a terminal in your Host machine
Give ifconfig (ipconfig if Windows)

You should see a new entry corresponding to the host-only adapter we created
Note down the inet addr (in my case 192.168.56.1)

5. Now boot your virtual machine
sudo vim /etc/network/interfaces

Add these entries
auto eth1
iface eth1 inet static
address 192.168.56.56 #based on the address you noted in step 4
netmask 255.255.255.0

Save and exit

sudo ifup eth1

Thats all, now you should be able to connect to your VM via SSH (like putty)

username@ipaddress

Sunday, May 3, 2015

Sunday, March 1, 2015

How to setup VirtualBox Guest Additions Shared Folder on Ubuntu Server

Install Ubuntu Server in VirtualBox (with out any additional packages, may change depending on your need)

Create a Shared folder on your VM's settings.

Setup the build enviorment in the VM:
sudo apt-get build-essentials linux-headers-generic

Insert the CD image:
Devices->Insert Guest Additions CD image

It will be mounted at /dev/cdrom (most likely). If not identify the image using:
sudo blkid

Mount it to a directory in your system so that you can access the contents
sudo mount <source> <target>

Go to the mounted directory and Install the Guest Additions:
sudo sh ./VBoxLinuxAdditions.run

Reboot your system

Add an entry in rc.local for automatic mount:
sudo vi /etc/rc.local

And make the below entry

mount.vboxsf <share_name> <target_directory> vboxsf

Now you may create a shortcut to the target

ln -s <target_directory> /home/<username>/<sharename>

Reboot the system, you should be able to access your share using the target_directory or the symbolic link

Monday, January 12, 2015

tail command in Windows

You can use the equivalent (in Power shell)

type <filename> -wait