Today I installed my first web server, which is Ubuntu 12.04 LTS.

I got Apache, PHP and MySql working, there is even MyPHPAdmin! Everything is working fine on that PC, but the problem is that I have no idea how to connect to this server from my PC.

Just to clarify- I got one PC that I work on and got another one, which has Ubuntu Server running. I even managed to connect them through the router, which I made to work as a switch. I can see the Ubuntu Server on my Windows PC in "Network", but it's empty, I can't see any files.

I tried to share a folder etc/www on Server, but it shows an error saying something about right, that I'm not this folder's owner. I guess I'm not doing the right thing at all, am I? Even if I could see shared folder on my Windows PC- I would still be not able to type "somedomain.com" on Windows PC and access for example index.php or MySql database.

So, the question is- how do I configure Ubuntu Server to be accessible from Windows PC?

4 Answers 4


Ensure you have OpenSSH installed on your server, you can install it with sudo apt-get install openssh-server. For future installations, you get a menu during installation of the server with different choices. Lamp, openssh, MySQL etc. If you mark openssh you're good to go after installation.

Furthermore, if the computer you want to access from runs windows, download a program called putty.

If it runs any distro of linux you can use the terminal. sudo apt-get install openssh-client. The syntax for accessing the server from your terminal is like this ssh my-user-name@my-server-ip. If you have a domain associated with the IP you can replace the IP with the domain.

Hope this helps

  • I've got OpenSSH on the server installed, but can't access it for the MySQL database nor through Filezilla FTP. Haven't got Linux distro on my Win PC, can I use Filezilla and MySQL Workbench instead?
    – Roland
    Commented Sep 2, 2012 at 13:20
  • Yes, you can use workbench and filezilla if you wish. Filezilla is good for uploading files, and that only. To access your SQL server, you type mysql -u root(OR another user) -p This will give you a password prompt for your root user (or another user). This requires that you have knowledge of the actual SQL language, unlike workbench (and other MySQL tools) that allows you to build the database graphically. Take a look at this if you wish to use CLI for the database work pantz.org/software/mysql/mysqlcommands.html
    – Erro
    Commented Sep 2, 2012 at 15:40

First of all ensure that Apache is running. To make sure, type ps -A | grep 'httpd' Any output is good, nothing means it isn't running.

After you have made sure that Apache is running, you have to take note of the server's IP address inside your network. If your server is connected to the network via a wired connection ifconfig eth0 and search for inetaddress. Note it down.

Picture of the above (I am demonstrating my wireless connection, because I am on a notebook and the wireless interface is assigned an IP address, but it should be the same for a wired connection, only the interface should be eth0 or eth1, depending on how many wired network interfaces your computer has): enter image description here

NOTE: Make sure you are checking a wired interface if your computer uses a wired connection, or a wireless if it is wirelessly connected. ifconfig -eth0 is good to check the wired connectivity, ifconfig -wlan0 is the wireless one. If none of the above are producing output, check ifconfig

Then just open a web browser, example: Chrome and type in the address bar the server's ip address followed by the port your apache server is running (default: port 80)

Example: enter image description here

If you have set up everything properly, while doing the above, your server should respond like this, provided that you have not configured apache to serve a webpage, by storing its files in /var/www.

enter image description here

  • Thanks NlightNFotis, this works! :) But for some reason I can't connect to MySql. I use MySQL Workbench, entered the IP as in the browser, but says: Failed to connect to MySQL at with user xxxxx. Should I set something up on a server for that to work?
    – Roland
    Commented Sep 2, 2012 at 13:03
  • @Roland Please consider upvoting the answer and/or marking it as the accepted so that other people that face a similar problem will know what to do to solve it =) Commented Sep 2, 2012 at 13:04
  • Is it that green tick I have to click?
    – Roland
    Commented Sep 2, 2012 at 13:08
  • Yes =) You did it properly earlier. Commented Sep 2, 2012 at 13:22
  • Any ideas for the MySQL Workbench and FileZilla? :)
    – Roland
    Commented Sep 2, 2012 at 13:29

You can connect your ubuntu server from windows machine using ssh protocol. For that you need to have putty on your windows machine.

For file transfer you can use WinSCP.

Ensure that you are running ssh server daemon on Ubuntu server.


Actually I found pretty simple solution. first if you don't have an open shh type in sudo tasksel and install openSsh server second go to your router's settings >>>advanced>NAT>DMZ server and than simply type in local IP of your server, hit apply and works perfectly fine. You can even donwload it on your phone and access it with password and username. To connect you will however need your external IP. If you don't know it type in curl ifconfig.me

Hope my anwser is helpful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .