Basic SSH Manual

Basic SSH Manual

With SSH access, you can work with your files and directories securely, and with connection from an application or command interpreter. Here is an example of a command interpreter for each of the most used operating systems:
  • Windows: fromcdmonWe recommend downloading the Ubuntu terminal to your Windows device. From the same store you can download for free. Download Terminal Ubuntu on Windows
  • Linux: You can use the operating system terminal itself to connect to the machine.
  • Mac: This operating system also allows you to connect via SSH via its own terminal.
1.-Enable SSH connection
In order to connect to the server you must enter the access data by SSH. You can view this data in the SSH access within the management of the accommodation in your control panel of cdmon.


Open the command terminal, where you must enter the following syntax to connect to the server:
  1. ssh Username@IP_server or server name
An example of connecting to the data from the previous screenshot:
  1. ssh example@123.123.123.123
He then asks for the key. You have to type the key you entered in activating SSH access in your dashboard.

When you establish the connection, you display the terminal in the following format:

selectedImg

You can start working with your default folder, which will be/entry by default. You can check your location at all times using the pwd command:

selectedImg

If you are in the/entry folder and want to access the management of your website's files, you have to exit the folder/entry with the command:
  1. cd ..
Once outside you can access the /web folder with the command:
  1. cd
Located in the /web folder, you can view all the directories and files on your website by activating the ls -la command. With this route we achieve results similar to the following:

selectedImg

2.- Basic commands
Here's a list of the basic commands for working with the files via SSH connection:
  • cd:the route where you want to access.
  • ls:lists the content of all files and directories.
  • rm:deletes file.
  • mkdir:create a new directory.
  • rmdir:delete folder.
  • pwd:location of the current route.
  • cp:copy a file to another directory.
  • mv:moves files between folders.
  • more:If you search with many results, this command lets you view the broken results.
  • unzip:unzip the compressed files.
  • ftp:connect to upload/download files from our local computer to the server.
  • mysql:allows you to work with databases, and exports/imports of content.
  • exit:leaves the remote machine where you are connected.
  • clear:clean up all the information you have on the screen.

3.- SSH user permissions
When you start working with the SSH user, you must monitor the permissions you have assigned to each of the directories, as folders created by FTP or SSH have the same user, and they belong to the same user.

Here's an example of a folder created by FTP and another by SSH:

selectedImg

Assign 775 permissions in directories:

selectedImg

With this modification, you work with the same directory from SSH and FTP.
Note:When activating the SSH modifies the owner of the /home folder of your accommodation.

This prevents creating directories at the root of the site via FTP. You can create directories within the /web folder.

What commands can I use from SSH?
If you type twice on the tab, the command console will show you all the commands available with your SSH user:

selectedImg

For more information, you can contact us.
    • Related Articles

    • How to use GIT commands with Bitbucket repository

      In this tutorial we will show the steps to take to use the GIT commands to clone files from your hosting in a repository created in Bitbucket with the SSH of their cdmon hosting. First of all, you need to have a repository created in Bitbucket. If ...
    • How to set up White Label Panel (Management)

      Server domains In the accommodation ofcdmonyou have a white mark panel so that you can give access to another user and allow them to manage the hosting. The advantage of this dashboard is that the user you provide access will only be able to manage ...
    • How to manage our web hosting

      With the "Control Panel" of the web hosting, you can manage your hosting comfortably. The panel is made up of a section with hosting information and different sections with tools. To access the management panel of the hosting, in the "Basic list of ...
    • How to use the cdmon cache tool

      Server cache is a key tool for improving the speed and efficiency of your website. In essence, it works by storing copies of your site's pages and resources in a quick access location, reducing the need to load them from scratch whenever someone ...
    • How to create a GIT repository

      Here's step-by-step how to create and manage a GIT repository from your dashboard. This process is simple and straightforward, allowing you to set up a development environment quickly. Access to hosting Developer hosting Activate developer hosting ...