I am a Computer Science guy who understands networking very well. But when it comes to Web hosting companies I am clue less. I want to know how do web hosting companies give so many public IPs to so many users and each of them has root login also. How this is technically done that is what I am interested to know. I do not know how you people configure it.

In my case if I have to do I will buy a public IP from some one and connect my server to it and at max give some people SSH access to it.In case of Web hosting companies how is it done.

3 Answers 3


generally you wont be given ssh access to your hosting account, unless expressly asked or allowed. This is too bigger security risk. Some hosts do allow ssh access but only under certain circumstances or separate virtual systems or if you ask. After which they will turn off.

You generally have 3 types of hosting services; in a brief nutshell

  1. Shared web hosting service, where the physical machine and operating system will host several 10's to 100's of sites. Many websites reside on one web server connected to the Internet. Each site "sits" on its own partition, or section/place on the server, to keep it separate from other sites. The use of plesk or c-panel software and user control and each users can access their sites directories and add in options at will.

  2. Virtual private server (VPS), where the whole operating system is yours and not shared with anyone else. Virtual private server (VPS) is just a marketing term used by Internet hosting services to refer to a virtual machine.

    Virtual private servers bridge the gap between shared web hosting services and dedicated hosting services, giving independence from other customers of the VPS service in software terms but at less cost than a physical dedicated server. As a VPS runs its own copy of its operating system, customers have superuser-level access to that operating system instance, and can install almost any software that runs on the OS. You maintain pretty much the same and may get ssh access

  3. Dedicated hosting service, where physical server (hardware) and operating system not shared with anyone. Very expensive and rarely will you find. generally if you go this way I would find a data centre and put my own server in their racks

  • @IanN so in case of A you mean to say those 10 or 100 people will share the root password and in case of b only you will have your root password.If some hosting company decides to give its customers root access as per plan B I know one of my friend he directly does some thing like ssh user@public IP but what I am not able to understand is if each hosting company retains so many IPs then the IPv4 will all finish by these hosting companies only.Am I correct or it is done in some different way? Mar 3, 2011 at 11:22
  • @Registered User Consider that ipv4 addresses allow for around 4.3 billion unique numbers. Currently there are 130million registered domain names, 300million inactive domains. Out of these 130 and 300million inactive, how many run on shared hosting and how many use unique IP's? That still leaves a load of addresses. Business buy blocks of addresses.
    – IanN
    Mar 3, 2011 at 14:08
  • No A will not share root password at all. They will be allocated directory access, never root access. When I say root access I mean root access, not bottom level directory access. They can get to the root of their own www directory, not to the root of the operating systems file system however under the user root. This would never happen. Do a search for "shared hosting root access" there are some pretty good explanations
    – IanN
    Mar 3, 2011 at 14:14
  • @IanN thanks a lot for the wonderful explanation.I just have one more curiosity you mentioned there are 130 million registered domain names where did you get this information from? Mar 5, 2011 at 11:40
  • @Registered User I looked up whois.domaintools I think from memory or RIPE. Can't remember where I looked sorry
    – IanN
    Mar 5, 2011 at 20:24

In addition to IP-based hosting, hosting providers offer name-based hosting which allows multiple domains to be served from each IP address.

In Apache, for example, you can configure either type using Virtual Hosts.

In a configuration file such as /etc/apache2/sites-available/default for an IP-based host:

<VirtualHost www.smallco.com>
ServerAdmin webmaster@mail.smallco.com
DocumentRoot /groups/smallco/www
ServerName www.smallco.com
ErrorLog /groups/smallco/logs/error_log
TransferLog /groups/smallco/logs/access_log

or a name-based host:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain

They get one or more netblock allocations from their RIR. They're in the business of providing internet services, so they have a business case (and therefore need) to get a large block (or blocks) of addresses.

As far as giving root access goes, they'll provision virtual linux servers (Xen, KVM, OpenVZ, etc.) which allow them to give their customers full access to their own server(s) without having to worry about them negatively affecting other customers.

  • I have seen people logging in to their ISPs and using Plesk. Do there they use some kind of trick to redirect each customer to give his own server.Or how do people get ssh access to their servers because I do not see a two step login there. Feb 26, 2011 at 17:08
  • There are a million and one ways any of this could be set up, so I can't comment on how one specific ISP or another does things.
    – EEAA
    Feb 27, 2011 at 5:25
  • can you give some hind among those million ways because I really do not have any clue so I asked here. Mar 3, 2011 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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