Help me, i am noob about vm, and i don't know how to start vboxmanage.exe, i open it, i see a cmd window for a half of second, then it's closing! What should i do ??? i need to write these codes there
You run those commands in a terminal/command window. VBoxManage is the package that you are telling to do what ever it is you need to do from the command line.
The commands that you are trying to run though are from an older version of VirtualBox. Make sure that the command syntax is still the right ones for your version.
See Chapter 6.3.1 Configuring port forwarding with NAT
Sorry, i Have a host WINDOWs, and ubuntu in Virtual box, and i need to connect to my VM with putty, in VM settings i have NAT, but when i connect, i see NETWORK ERROR CONNECTION REFUSED, i've installed openssh-server, What should i do ?
If you read Chapter 6.3.1 Configuring port forwarding with NAT you will see the actual command to set the port and then you use putty to access the guest with the host IP and the port that you assign to the guest.
If you have Ver. 4.0.* of VirtualBox you can even set the port to forward in the network section of the guest in the VirtualBox main manager.
That should work but I don't understand everyone's affection of using the local loopback for the IP address. This can cause issues down the road.
Why not use the hosts IP address and the guest IP address instead of the local loopback?
Sorry, i don't understand, can you write, what should i write there??? Because i still have connection refused....I know that in NAT my ip is 10.0.2.15
It's better to leave the IP address fields empty. They are not required, only the port fields are. When the fields are empty, any IP will be used to listen on and send to. As the User Manual states, giving an IP address will only ensure that the VM is accessible on that IP only, or if the Guest changes IP, it won't be accessible either. A safety feature if you like, which can backfire if used inappropriately.