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
- In order to create SSH keys download the PuTTY installer from the putty.org site;
- Launch the installer and install PuTTY on your PC;
- Once PuTTY is installed, go to your Start menu, find the PuTTYgen app and launch it;
- Click the “Generate” button and move your cursor over the blank area until the key is generated;
- Come up with a password for your key and type it twice in the appropriate fields;
- Click the “Save private key” button, name your key and save it on your PC;
- Copy your public key’s code to your clipboard and to a safe place.
Configuring an SSH connection
- Go to your client area to the “Services – My services” section and click the “Login to Direct Admin” button;
- The DirectAdmin panel will be opened. Go to the “Advanced Features” section and click the “SSH Keys” button;
- Click the “Paste Key” button and paste the public key’s code you’ve copied;
- Click the “Create” button and you will see the “SSH key authorized” banner;
Establishing an SSH connection
- Now go back to your Start menu, find the PuTTY app, and launch it;
- 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; - Go to the “SSH – Auth” section and click the “Browse” button;
- Find the private key you’ve saved on your PC and click the “Open” button;
- Now click the “Open” button in the PuTTY interface;
- 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;
- 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
Generating SSH keys
- In order to create SSH keys run the Terminal app and execute the following command:
ssh-keygen -t rsa - The system will ask you to save your keys to /home/user/.ssh/id_rsa. Press Enter;
- 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;
- You will see the message stating that your pair of keys is created;
- To view the public key’s code execute the following command:
cat ~/.ssh/id_rsa.pub - Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
- Go to your client area to the “Hosting management” section and click the “Open Direct Admin” button;
- The DirectAdmin panel will be opened. Go to the “Advanced Features” section and click the “SSH Keys” button;
- Click the “Paste Key” button and paste the public key’s code you’ve copied;
- Click the “Create” button and you will see the “SSH key authorized” message;
Establishing an SSH connection
- Now go back to the Terminal app to establish an SSH connection;
- 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; - The system will ask you to confirm this operation. Type ‘yes’ and press Enter;
- 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.
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
- Go to your client area to the “Hosting management” section and click the “Open cPanel” button;
- The cPanel will be opened. Go to the “Security” section and click the “SSH Access” button;
- Click the “Manage SSH keys” button
- Click the “Generate” a New Key button;
- 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;
- Once all the data is specified, click the “Generate” button;
- You will see the “Key generating Completed!” message. Click the “Go back” link;
- Now you can see, that your key is “not_authorized”. Click the “Manage” button in front of this key;
- Click the “Authorize” button;
- You will see the “The key has been authorized!” message. Click the “Go back” link;
- In the “Private keys” area click the “View/Download” button in front of your key;
- Scroll the page down to the “Convert the key to PPK format” area;
- Type the password you used when creating the key and click the “Convert” button;
- Once the key is converted, click the “Download Key” button and save the key on your PC;
Establishing an SSH connection
- Now go to the putty.org site and download the PuTTY installer for your system;
- Launch the installer and install PuTTY on your PC;
- Once PuTTY is installed, go to your Start menu, find the PuTTY app and launch it;
- 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;
- Go to the “SSH – Auth” section and click the “Browse” button;
- Find the private key you’ve saved on your PC and click the “Open” button;
- Now click the “Open” button in the PuTTY interface;
- 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;
- 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
- In order to create SSH keys run the Terminal app and execute the following command:
ssh-keygen -t rsa - The system will ask you to save your keys to /home/user/.ssh/id_rsa. Press Enter;
- 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;
- You will the message stating that your pair of keys is created;
- To view the public key’s code execute the following command:
cat ~/.ssh/id_rsa.pub - Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
- Go to your client area to the “Hosting management” section and click the “Open cPanel” button;
- cPanel will be opened. Go to the “Security” section and click the “SSH Access” button;
- Click the “Manage SSH keys” button
- Click the “Import Key” button;
- Paste your public key’s code you’ve copied into the “Paste the public key…” box;
- Type the password you used when creating the keys into the “Passphrase” box;
- Click the “Import” button;
- You will see the “The key was imported.” message. Click the “Go back” link;
- Now you can see, that your key is “not_authorized”. Click the “Manage” button in front of this key;
- Click the “Authorize” button;
- You will see the “The key has been authorized!” message. Click the “Go back” link;
Establishing an SSH connection
- Now go back to the Terminal app to establish an SSH connection;
- 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; - The system will ask you to confirm this operation. Type ‘yes’ and press Enter;
- 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
- In order to create SSH keys download the PuTTY installer from the putty.org site;
- Launch the installer and install PuTTY on your PC;
- Once PuTTY is installed, go to your Start menu, find the PuTTYgen app and launch it;
- Click the “Generate” button and move your cursor over the blank area until the key is generated;
- Come up with a password for your key and type it twice in the appropriate fields;
- Click the “Save private key” button, name your key and save it on your PC;
- Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
- Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
- The ISPmanager panel will be opened. Go to the “Dashboard” section and click the “File manager” button;
- Click the “Add” button in the top menu bar;
- Set the “Type” option to “Directory” and type .ssh to the “Name” field;
- Click OK;
- Now click the “.ssh” directory and then the “Attributes” button in the top menu bar;
- Type 700 into the “Permissions” field and click OK;
- Now double-click the .ssh directory to open it;
- Click the “Add” button in the top menu bar;
- Type authorized_keys to the “Name” field and create this file by clicking OK;
- Now click the “authorized_keys” file and then the “Attributes” button in the top menu bar;
- Type 600 into the “Permissions” field and click OK;
- Now double-click the authorized_keys file to open it;
- Paste your public key’s code you’ve copied into this file and click OK;
Establishing an SSH connection
- Now go back to your Start menu, find the PuTTY app, and launch it;
- 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;
- Go to the “SSH – Auth” section and click the “Browse” button;
- Find the private key you’ve saved on your PC and click the “Open” button;
- Now click the “Open” button in the PuTTY interface;
- 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;
- 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
Generating SSH keys
- In order to create SSH keys run the Terminal app and execute the following command:
ssh-keygen -t rsa - The system will ask you to save your keys to /home/user/.ssh/id_rsa. Press Enter;
- 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;
- You will see the message stating that your pair of keys is created;
- To view the public key’s code execute the following command:
cat ~/.ssh/id_rsa.pub - Copy your public key’s code to your clipboard and to a safe place;
Configuring an SSH connection
- Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
- The ISPmanager panel will be opened. Go to the “Dashboard” section and click the “File manager” button;
- Click the “Add” button in the top menu bar;
- Set the “Type” option to “Directory” and type .ssh to the “Name” field;
- Click OK;
- Now click the “.ssh” directory and then the “Attributes” button in the top menu bar;
- Type 700 into the “Permissions” field and click OK;
- Now double-click the .ssh directory to open it;
- Click the “Add” button in the top menu bar;
- Type authorized_keys to the “Name” field and create this file by clicking OK;
- Now click the “authorized_keys” file and then the “Attributes” button in the top menu bar;
- Type 600 into the “Permissions” field and click OK;
- Now double-click the authorized_keys file to open it;
- Paste your public key’s code you’ve copied into this file and click OK;
Establishing an SSH connection
- Now go back to the Terminal app to establish an SSH connection;
- 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; - The system will ask you to confirm this operation. Type ‘yes’ and press Enter;
- 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.