We've already talked about website hosting here on the blog, but there are several technical aspects that involve this service that you may come across. For example, do you know what SSH is?
Any company that has a website will have to deal with the management of the information it contains. In other words, creating the site is not enough, it is necessary to manage it.
And the files from the website in some moments will need to be uploaded to the hosting server. Using the SSH protocol is one of the alternatives to access the hosting server.
Other alternatives are to use a file manager or an FTP program. But there are some differences between them and SSH.
If you want to know what SSH is and how it works, read the next topics in this article.
In addition to this definition, we will also cover the types of encryption that can be used in the SSH protocol, why it should be used, and what its advantages are over other server access methods.
What is SSH?
If you want to know what SSH is, you should keep in mind the context of your website hosting and the need for server access.
SSH stands for Secure Shell, which could be translated as “secure shell”. We can think of it as a security mechanism that hosting services can provide.
In practice, SSH provides a secure connection to the remote server over the internet.
This connection is encrypted and needs to be authenticated at both ends (on the server and on the computer).
This means that if the data packet you want to send to the server is intercepted in this process, whoever intercepts it will not be able to access the information.
The effectiveness of thwarting possible interceptions is thanks to encryption, as only the server and the computer, which are connected to each other, have the key to decrypt the messages.
This way, the website's developers can make changes whenever necessary without risking information security.
The SSH protocol is well known and used by companies and IT professionals and is present in all professional hosting services.
How does SSH work?
Now that we've explained what SSH is, let's talk a little more about how it works.
The purpose of SSH is to provide authentication for the remote user so that they can communicate with the server securely.
For this, SSH needs to be accessed via the terminal, for the development of encryption to protect the data that will be sent, regardless of the operating system used.
If the operating system is Windows, you will need the assistance of an SSH client, such as Putty, to open connections. It is a software that allows remote access to the server via SSH terminal.
But if your operating system is Linux or Mac, the command terminal that is installed on the system already has the functions of the SSH client.
It could be that SSH access is disabled by default by your hosting service provider. So, it is important to enable it before testing the connection.
Activation of SSH access can be done by the hosting service's own control panel or requested through technical support.
After this activation, contact with the server can be established via SSH terminal.
When does SSH need to be accessed?
In addition to understanding what SSH is, it is also necessary to understand in which situations it needs to be used.
In practice, SSH is used at all stages where a secure connection to the remote server is required.
This happens in the routine work of website developers and programmers, in the work of programming and deploying.
In the case of programming, the protocol is used to create the website, in which codes are developed and changes made, the behavior of which needs to be tested with the application on air.
As the exchange of information with the remote server is done several times during this procedure, code security is very necessary. Hence the use of SSH.
It guarantees that the intellectual property of the professionals involved and the client's investments will be safe.
Deploy refers to site update work performed by developers to implement changes or new applications.
As deploying is often a long job and requires transferring a large number of files, this data exchange also needs a secure method.
Therefore, professionals who perform these tasks recurrently use the SSH protocol, which ensures that the transfers of new applications and changes are made in a timely manner and without any information being lost.
What encryptions can be used in the SSH protocol?
As we saw in the topic “What is SSH”, in this protocol the files exchanged with the remote server are protected by encryption.
However, there are different encryption structures that can be used for this demand. They fall into basically three groups: symmetric, asymmetric and hashing.
See its features below.
Symmetric encryption is based on creating a key that is shared only with the user and the server.
Its function is to encrypt or decrypt the message. Therefore, to read the content, it is necessary to present this key.
The creation and automatic sending of the encryption key is done by an algorithm, which repeats the process, generating a new key every time the user creates an SSH session.
In this type of encryption, two different keys are created, one for the server and one for the user. These keys are called public and private.
The public key is distributed openly and it is not possible to know the private key through it.
In this case, contents encrypted by public keys can only be decrypted by the private key of the same machine, that is, only the client of the hosting service can access the private key.
Hashing is a one-way encryption model, in which an algorithm creates a hash to protect messages through authentication codes and a specific form of encryption.
Hash-based Message Authentication Codes (HMACs) prevent codes sent to the remote server from being tampered with.
Why should SSH be used?
In certain situations, the use of the SSH protocol can be essential. Furthermore, it has some advantages over other ways of contacting the remote server.
See below the main ones:
- Agility: with the use of a command terminal, necessary for the application of the SSH protocol, the user can execute many commands as if the operations were carried out directly on the server;
- Data compression: before sending the message to the server, SSH compresses the data, which speeds up transmission and saves internet bandwidth;
- Deploy services: the SSH protocol is compatible with the main deploy services used by developers to control the versions of their applications;
- Security: this is the main reason for using SSH, as with encryption, messages will hardly be accessed by third parties.
If, upon discovering what SSH is, you thought of using it mainly because of the security offered by contacting the remote server, we recommend, as a complement to this reading, our article on monitoring and security. Just click here. To the next!
Junte-se à conversa.