how do i connect to my ubuntu server over my wifi

Soldato
Joined
30 Nov 2005
Posts
13,916
I have ubuntu running in a virtual box on my main pc how do i go about connecting to it from my netbook which is also running ubuntu.

i have lamp running on the main pc and would like to mess about with the msql server from my netbook whilst i am on the netbook over my wifi network for now and possible over the net at a later date.


I am completely new to this networking malarkey as you can tell .

any good tutorials or advice guys?
 
#1 Install the openssh-server package on your server (should be there by default):

Code:
sudo apt-get install openssh-server

#2 Install openssh-client on your PC*:

Code:
sudo apt-get install openssh-client

#3 Open a terminal on your PC and enter:

Code:
ssh serverusername@IPaddress

#4 Enter your user password and you now have full remote access to your server through the terminal on you PC

*Edit: Oh, and if your PC is windows then use Putty to connect to your ubuntu server:

http://www.chiark.greenend.org.uk/~sgtatham/putty/
 
Last edited:
By default your VM is probably using NAT for networking, this is no good for communicating outside your box.

The solution, all you need to do is switch to host networking in Virtual Box. Go into the VM settings -> Network -> Adapter X and change the "Attached To" to "Host Interface", boot up your VM and find out the new IP or set a static one, this IP should have come from your networks DHCP server (your router unless you have a complex setup) and will be accessible from your netbook, unless you have any crazy firewalls messing about with things or your wifi network is on a different segment then it should just work.
 
yes like tntcoder mentions make sure that your vm is directly attached to the host interface or bridged into it (like it does in VMware), this can be found in the virtual machine network device settings.

relative you forgot to mention graphical access!
to get graphical access you can enable remote access on your VM by going to system -> preferences -> remote desktop (assuming you havent deleted the menu bar from the panel :)
type ifconfig in a terminal to get your ip address (applications -> accessories -> terminal)
then on your netbook connect to your vm typing this ip address into the remote desktop app in ubuntu (applications -> internet -> remote desktop viewer)
dunno what ubuntu you got loaded on your netbook so dunno if my instructions will be quite correct but worth a go at least.
 
hmm i tried switching to host networking and lost any network connection in the VB-buntu must be something i doing wrong I guess. Do I just switch to that and leave all other setting alone i take it.
 
For a server you normally don't use remote desktop (VNC). As far as I know no desktop environment (gnome, KDE, xfce) or x-server is installed on a ubuntu server disto by default.
 
#1 Install the openssh-server package on your server (should be there by default):

Code:
sudo apt-get install openssh-server

#2 Install openssh-client on your PC*:

Code:
sudo apt-get install openssh-client

#3 Open a terminal on your PC and enter:

Code:
ssh serverusername@IPaddress

#4 Enter your user password and you now have full remote access to your server through the terminal on you PC

*Edit: Oh, and if your PC is windows then use Putty to connect to your ubuntu server:

http://www.chiark.greenend.org.uk/~sgtatham/putty/

ssh -X ipaddress -l usernameonserver

that'll allow you to use X windowing. For mysql you might want to do
apt-get install mysql-query-browser (on the server)
Thenwhen you've ssh -X'd into your server from your net book do
mysql-query-browser &
 
What kind of virtual machine is it?

Your post suggests Sun Virtualbox, which isn't suitable for running a server in.

Use M$ Virtual PC or VMWare, as they will have the VM go and gets its own IP address.
 
What kind of virtual machine is it?

Your post suggests Sun Virtualbox, which isn't suitable for running a server in.

Use M$ Virtual PC or VMWare, as they will have the VM go and gets its own IP address.

Whats wrong with using Virtualbox for servers? You can configure their VMs to get IP's from your DHCP server. Obviously VMWare is the choice for production servers, but for mucking around at home with a LAMP server (sounds like the OP is) VirtualBox is more than capable IMO.
 
Last edited:
Whats wrong with using Virtualbox for servers? You can configure their VMs to get IP's from your DHCP server. Obviously VMWare is the choice for production servers, but for mucking around at home with a LAMP server (sounds like the OP is) VirtualBox is more than capable IMO.

I fully agree with this :) I use virtualbox for server instances (just to play with) without any major issues at all.
 
So It can, my mistake.

I'd actually set mine up to do this a while ago. Which means my VM was running on one of my external IPs with no firewall earlier, oops.
 
Back
Top Bottom