Virtualbox connect from host to guest via ssh and enable internet on guest

  1. Open Oracle VM Virtualbox Manager


  2. Place the cursor on the machine that you want to configure and press the button Settings.
    -> Network -> Adapter 1-> check Enable Network Adapter -> in Attached to choose NAT.
    -> in Advanced section -> press Port Forwarding  -> in Port Forwarding Rules, press addition button ->
    Fill the rule , by the following way:
    Host IP: (leave blank)
    Host Port: 22   (or any port that your host has free)
    Guest IP: (leave blank)
    Guest Port: 22


  3. Start up the VM and connect to the guest using ssh.
    Hostname: localhost (or your machine name)
    Port: 22 (it is the same that we have indicated during rule configuration field Host Port)


  4. If you are not using proxy, than you can think that the post finished for you. You can connect to the guest from os and also you have an internet on your guest.

    But if proxy is used then you should configure parameter http_proxy.
    You can enter this variable information in every user’s  ~/.bash_profile or you can do it globally in /etc/profile file.

    #add the following entry in profile file

    [root@oracle01 ~]# vi /etc/profile
    export http_proxy=

    Logout and login for changes to take effect.


How To Configure Network Interfaces in Solaris

I will discuss how to change existing interface by another one.

I have interface ce0 and want it to change with ce5.

1. Stop the interface

# ifconfig ce0 down

2. Unplumb the interface

# ifconfig ce0 unplumb

3. Plumb another interface

# ifconfig ce5 plumb

4. Configure the interface

# ifconfig ce5 netmask

5. Start the interface

# ifconfig ce5 up

This changes are not permanent, it will be lost after reboot. To make it permanent:

1. Edit the file /etc/hosts and enter IPs for each interface, but include different names.

For example,


In my case I have just one(because, I am not adding interface but changing)


2. edit the file(s) /etc/hostname.<interface>

# cat /etc/hostname.ce0

# cat /etc/hostname.ce5

In my case I have just the last one.