Linux Server setup

SSH connection to the server

It's getting exciting! We start the first connection to our freshly installed Linux server.

In the previous chapter, we rented a Cloud Server, installed Ubuntu Linux as the operating system, and registered a domain. Now the server is waiting for an SSH connection.

The goal of this chapter is to establish an SSH connection via a terminal.

For the SSH connection we need the following server data:

  • IP: 116.203.69.89
  • Port: 22 (Default SSH port)
  • Username: tom (set at installation)
  • Passwort: *****

The authentication method on the server is currently a password-based one. We will set up a key-based method later (authentication with a private key).

Depending on the operating system, the procedure varies a little:


SSH and OpenSSH explanation

SSH (Secure Shell) is a network protocol. OpenSSH on the other hand, is a suite of programs that includes a service for authentication and communication, services for file transfer (SFTP and SCP), and tools to generate private and public keys.

So an SSH server service is running on the server. By default, it is set to port 22. The local computer needs an SSH client (for example, OpenSSH) to connect and authenticate itself using the SSH protocol. Thanks to the SSH protocol, communication is always encrypted.


Difference Cloud Server to Shared Hosting

Unlike shared hosting, where only access to the web space and web account is allowed, with our server we access a Unix shell (command-line interpreter) and thus gain control over the operating system. The default command line on Ubuntu is the Bash. On the one hand, this allows us to install everything (with almost no restrictions), but on the other hand, it obliges us to do everything ourselves. But honestly: how many features that are included in a shared hosting package are really used?! I would say: access to the webspace and database, configure a few domains and subdomains, forward a few email aliases ... maybe some cronjobs ... everything else is actually just marketing from the hoster.

With access to the command line, entirely new technologies come into consideration. This is the only way to run software platforms such as Node.js, Python or .NET. Or package managers like npm, pip or Composer.

With both hosting variants the workflow of web development is pretty much the same. Files can be transferred via SFTP. Editors and IDEs connect via SSH. However, a very important advantage of having your own server, the ability to use a version control, such as Git.


continue as: