How to connect to hosting via SSH

SSH is already enabled on all our Linux shared hosting plans. You only have to add your SSH keys to the control panel to configure an SSH connection.

DirectAdmin

Windows

Generating SSH keys
  1. In order to create SSH keys download the PuTTY installer from the putty.org site;
  2. Launch the installer and install PuTTY on your PC;
  3. Once PuTTY is installed, go to your Start menu, find the PuTTYgen app and launch it;
  4. Click the “Generate” button and move your cursor over the blank area until the key is generated;
  5. Come up with a password for your key and type it twice in the appropriate fields;
  6. Click the “Save private key” button, name your key and save it on your PC;
  7. Copy your public key’s code to your clipboard and to a safe place.
Configuring an SSH connection
  1. Go to your client area to the “Services – My services” section and click the “Login to Direct Admin” button;
  2. The DirectAdmin panel will be opened. Go to the “Advanced Features” section and click the “SSH Keys” button;
  3. Click the “Paste Key” button and paste the public key’s code you’ve copied;
  4. Click the “Create” button and you will see the “SSH key authorized” banner;
Establishing an SSH connection
  1. Now go back to your Start menu, find the PuTTY app, and launch it;
  2. In the “Host Name” field type your control panel’s address (it can be copied from the browser’s address line).
    – for example – da1.d.fozzy.com;
  3. Go to the “SSH – Auth” section and click the “Browse” button;
  4. Find the private key you’ve saved on your PC and click the “Open” button;
  5. Now click the “Open” button in the PuTTY interface;
  6. A new window with a command line will be opened. Type the login of your hosting service. The login is sent in the welcome email after ordering a hosting service;
  7. Type the password you used when creating the keys. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  8. Done.

 

 

macOS and Linux

Generating SSH keys
  1. In order to create SSH keys run the Terminal app and execute the following command:
    ssh-keygen -t rsa
  2. The system will ask you to save your keys to /home/user/.ssh/id_rsa. Press Enter;
  3. Come up with a password for your key and type it twice. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  4. You will see the message stating that your pair of keys is created;
  5. To view the public key’s code execute the following command:
    cat ~/.ssh/id_rsa.pub
  6. Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
  1. Go to your client area to the “Hosting management” section and click the “Open Direct Admin” button;
  2. The DirectAdmin panel will be opened. Go to the “Advanced Features” section and click the “SSH Keys” button;
  3. Click the “Paste Key” button and paste the public key’s code you’ve copied;
  4. Click the “Create” button and you will see the “SSH key authorized” message;
Establishing an SSH connection
  1. Now go back to the Terminal app to establish an SSH connection;
  2. Execute the following command:
    ssh your_login@your_server
    where
    your_login – your hosting service login which is sent in the welcome email after ordering a hosting service;
    your_server – your control panel’s address (it can be copied from the browser’s address line). For example – da1.d.fozzy.com;
  3. The system will ask you to confirm this operation. Type ‘yes’ and press Enter;
  4. Type the password you used when creating the keys. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  5. Done.

 

cPanel

In order to execute bash commands on the cPanel hosting, you don’t have to establish a remote SSH connection. The Terminal app is already installed inside the cPanel. You can reach it from the cPanel main page.
But if you still need to establish the remote connection for some reason, do as follows:

Windows

Generating SSH keys
  1. Go to your client area to the “Hosting management” section and click the “Open cPanel” button;
  2. The cPanel will be opened. Go to the “Security” section and click the “SSH Access” button;
  3. Click the “Manage SSH keys” button
  4. Click the “Generate” a New Key button;
  5. A new window where you can specify the following data will be opened:
    • Key Name – the name of your key. You can skip this and leave the default name;
    • Key Password – create a new password. This password will be used for establishing an SSH connection;
    • Reenter Password – type your password again;
    • Key Type – leave the “RSA” value;
    • Key Size – the bigger the size, the more reliable the encryption;
  6. Once all the data is specified, click the “Generate” button;
  7. You will see the “Key generating Completed!” message. Click the “Go back” link;
  8. Now you can see, that your key is “not_authorized”. Click the “Manage” button in front of this key;
  9. Click the “Authorize” button;
  10. You will see the “The key has been authorized!” message. Click the “Go back” link;
  11. In the “Private keys” area click the “View/Download” button in front of your key;
  12. Scroll the page down to the “Convert the key to PPK format” area;
  13. Type the password you used when creating the key and click the “Convert” button;
  14. Once the key is converted, click the “Download Key” button and save the key on your PC;
Establishing an SSH connection
  1. Now go to the putty.org site and download the PuTTY installer for your system;
  2. Launch the installer and install PuTTY on your PC;
  3. Once PuTTY is installed, go to your Start menu, find the PuTTY app and launch it;
  4. In the “Host Name” field type your control panel’s address (it can be copied from the browser’s address line).
    • for example – cpanel20.v.fozzy.com;
  5. Go to the “SSH – Auth” section and click the “Browse” button;
  6. Find the private key you’ve saved on your PC and click the “Open” button;
  7. Now click the “Open” button in the PuTTY interface;
  8. A new window with a command line will be opened. Type the login of your hosting service;
    • the login is sent in the welcome email after ordering a hosting service;
  9. Type the password you used when creating the keys. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;

Done

macOS and Linux

Creating SSH keys
  1. In order to create SSH keys run the Terminal app and execute the following command:
    ssh-keygen -t rsa
  2. The system will ask you to save your keys to /home/user/.ssh/id_rsa. Press Enter;
  3. Come up with a password for your key and type it twice. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  4. You will the message stating that your pair of keys is created;
  5. To view the public key’s code execute the following command:
    cat ~/.ssh/id_rsa.pub
  6. Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
  1. Go to your client area to the “Hosting management” section and click the “Open cPanel” button;
  2. cPanel will be opened. Go to the “Security” section and click the “SSH Access” button;
  3. Click the “Manage SSH keys” button
  4. Click the “Import Key” button;
  5. Paste your public key’s code you’ve copied into the “Paste the public key…” box;
  6. Type the password you used when creating the keys into the “Passphrase” box;
  7. Click the “Import”  button;
  8. You will see the “The key was imported.” message. Click the “Go back” link;
  9. Now you can see, that your key is “not_authorized”. Click the “Manage” button in front of this key;
  10. Click the “Authorize” button;
  11. You will see the “The key has been authorized!” message. Click the “Go back” link;
Establishing an SSH connection
  1. Now go back to the Terminal app to establish an SSH connection;
  2. Execute the following command:
    ssh your_login@your_server
    where
    your_login – your hosting service login which is sent in the welcome email after ordering a hosting service;
    your_server – your control panel’s address (it can be copied from the browser’s address line). For example – cpanel20.v.fozzy.com;
  3. The system will ask you to confirm this operation. Type ‘yes’ and press Enter;
  4. Type the password you used when creating the keys. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;

Done.

ISPmanager

In order to execute bash commands on the ISPmanager hosting, you don’t have to establish a remote SSH connection. The Terminal app is already installed inside the ISPmanager panel. You can reach it from the ISPmanager main page. Just go to the “Tools” section and click the “Shell-client” button.
But if you still need to establish the remote connection for some reason, do as follows:

Windows

Generating SSH keys
  1. In order to create SSH keys download the PuTTY installer  from the putty.org site;
  2. Launch the installer and install PuTTY on your PC;
  3. Once PuTTY is installed, go to your Start menu, find the PuTTYgen app and launch it;
  4. Click the “Generate” button and move your cursor over the blank area until the key is generated;
  5. Come up with a password for your key and type it twice in the appropriate fields;
  6. Click the “Save private key” button, name your key and save it on your PC;
  7. Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
  1. Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
  2. The ISPmanager panel will be opened. Go to the “Dashboard” section and click the “File manager” button;
  3. Click the “Add” button in the top menu bar;
  4. Set the “Type” option to “Directory” and type .ssh to the “Name” field;
  5. Click OK;
  6. Now click the “.ssh” directory and then the “Attributes” button in the top menu bar;
  7. Type 700 into the “Permissions” field and click OK;
  8. Now double-click the .ssh directory to open it;
  9. Click the “Add” button in the top menu bar;
  10. Type authorized_keys to the “Name” field and create this file by clicking OK;
  11. Now click the “authorized_keys” file and then the “Attributes” button in the top menu bar;
  12. Type 600 into the “Permissions” field and click OK;
  13. Now double-click the authorized_keys file to open it;
  14. Paste your public key’s code you’ve copied into this file and click OK;
Establishing an SSH connection
  1. Now go back to your Start menu, find the PuTTY app, and launch it;
  2. In the “Host Name” field type your control panel’s address (it can be copied from the browser’s address line).
    • for example – ispmanager2.v.fozzy.com;
  3. Go to the “SSH – Auth” section and click the “Browse” button;
  4. Find the private key you’ve saved on your PC and click the “Open” button;
  5. Now click the “Open” button in the PuTTY interface;
  6. A new window with a command line will be opened. Type the login of your hosting service;
    • the login is sent in the welcome email after ordering a hosting service;
  7. Type the password you used when creating the keys. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  8. Done.

 

macOS and Linux

Generating SSH keys
  1. In order to create SSH keys run the Terminal app and execute the following command:
    ssh-keygen -t rsa
  2. The system will ask you to save your keys to /home/user/.ssh/id_rsa. Press Enter;
  3. Come up with a password for your key and type it twice. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  4. You will see the message stating that your pair of keys is created;
  5. To view the public key’s code execute the following command:
    cat ~/.ssh/id_rsa.pub
  6. Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
  1. Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
  2. The ISPmanager panel will be opened. Go to the “Dashboard” section and click the “File manager” button;
  3. Click the “Add” button in the top menu bar;
  4. Set the “Type” option to “Directory” and type .ssh to the “Name” field;
  5. Click OK;
  6. Now click the “.ssh” directory and then the “Attributes” button in the top menu bar;
  7. Type 700 into the “Permissions” field and click OK;
  8. Now double-click the .ssh directory to open it;
  9. Click the “Add” button in the top menu bar;
  10. Type authorized_keys to the “Name” field and create this file by clicking OK;
  11. Now click the “authorized_keys” file and then the “Attributes” button in the top menu bar;
  12. Type 600 into the “Permissions” field and click OK;
  13. Now double-click the authorized_keys file to open it;
  14. Paste your public key’s code you’ve copied into this file and click OK;
Establishing an SSH connection
  1. Now go back to the Terminal app to establish an SSH connection;
  2. Execute the following command:
    ssh your_login@your_server
    where
    your_login – your hosting service login which is sent in the welcome email after ordering a hosting service;
    your_server – your control panel’s address (it can be copied from the browser’s address line). For example – cpanel20.v.fozzy.com;
  3. The system will ask you to confirm this operation. Type ‘yes’ and press Enter;
  4. Type the password you used when creating the keys. No symbols will be displayed when typing the password, this is normal. Once you’ve finished, press Enter;
  5. Done.
Rate this article
Share this article
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
In this article