Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 "" 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?

share|improve this question
up vote 4 down vote accepted

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

share|improve this answer
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 Sep 2 '12 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 – Erro Sep 2 '12 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

share|improve this answer
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 Sep 2 '12 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 =) – NlightNFotis Sep 2 '12 at 13:04
Is it that green tick I have to click? – Roland Sep 2 '12 at 13:08
Yes =) You did it properly earlier. – NlightNFotis Sep 2 '12 at 13:22
Any ideas for the MySQL Workbench and FileZilla? :) – Roland Sep 2 '12 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.