Skip to main content

How to Access the SSH Command Line in cPanel

 

How to Access the SSH Command Line in cPanel - Takneeki Code

Accessing the SSH Command Line in cPanel allows you to manage your website files, execute commands, and perform administrative tasks remotely. This guide will walk you through the process of using PuTTY and SSH keys to securely access your cPanel files. If you're managing a website, knowing how to use SSH can significantly improve your efficiency and control over your hosting environment.


Why Use SSH in cPanel?

Secure Shell (SSH) is a powerful protocol that enables you to remotely access your web server via a secure and encrypted connection. Using SSH, you can:

  • Manage files and directories without using cPanel's file manager.
  • Run scripts and execute commands efficiently.
  • Perform administrative tasks like backups and database management.
  • Troubleshoot and fix issues faster.

Prerequisites

Before you begin, ensure you have the following:

  • A cPanel hosting account with SSH access enabled.
  • PuTTY installed on your system (Download it from here).
  • SSH key authentication set up in your cPanel.

Step-by-Step Guide to Access SSH in cPanel

1. Enable SSH in cPanel

  1. Log in to cPanel.
  2. Navigate to SSH Access under the Security section.
  3. Click Manage SSH Keys to generate a new key.
  4. Provide a name for the key and set a passphrase (optional but recommended).
  5. Click Generate Key and then Authorize the key under the Public Keys section.
  6. Download the private key (.ppk file) to use with PuTTY.

2. Install and Configure PuTTY

  1. Download and install PuTTY from the official website.
  2. Open PuTTYgen and load the private key (.ppk file) you downloaded from cPanel.
  3. Save the key again using PuTTYgen to ensure compatibility.
  4. Open PuTTY and enter your server’s IP address or hostname in the Host Name field.
  5. Set the Port to 22 (default SSH port for secure connections).
  6. Under Connection > SSH > Auth, browse and select your private key file (.ppk).
  7. Click Open to initiate the connection.

3. Log in to cPanel SSH

  1. When prompted, enter your cPanel username.
  2. If you set a passphrase for your SSH key, enter it when asked.
  3. Once logged in, you’ll have access to your server’s command line.

4. Using Basic SSH Commands

Now that you have access, here are some essential SSH commands to manage your server:

  • ls – List files in the current directory.
  • cd foldername – Change directory.
  • pwd – Show the current directory.
  • rm filename – Delete a file.
  • mkdir foldername – Create a new folder.
  • nano filename – Edit a file using the Nano text editor.

5. Additional SSH Tips

  • Transferring Files Securely: Use scp (secure copy) or rsync to move files between your local system and server.
  • Checking Server Load: Use top or htop to monitor your server's performance.
  • Restarting Services: If you have root access, restart Apache (sudo systemctl restart apache2) or MySQL (sudo systemctl restart mysql).

Watch the Tutorial Video

For a detailed visual guide, watch our YouTube video: How to Access SSH in cPanel.

Conclusion

By following this guide, you now have a secure way to access and manage your cPanel files using SSH and PuTTY. This method gives you greater control, efficiency, and security over your web hosting environment.

Join the Community

Have any questions? Join our Facebook community: Takneeki Code and share your experience!

Thanks for reading and happy coding! 🚀

Comments

Popular posts from this blog

Televzr Video Downloader

Televzr(Beta Version) is a alternate of IDM. it's Download in full HD Quality like  IDM in 1080pixl. this is new version Beta . Televzr is in very  low size setup. Here is Decryption Key   5DB4VItGojkLx2V7njxfWw

Bandi Came Crack New Version

Bandi Came Screen Recorder Latest version. Bandi Came screen recorder is new in the the market it's provide many feature such as Screen recording,  Game Recording, YouTube video recording    and as well as provide the feature of video editing , photo capturing and etc.

Bytefence Anti Malware New License Key with Crack

Bytefence Anti Malware 5.4.1.19 Key and Crack Here, I'm share withe you License Key of Bytefence premium Anti Malware 5.4.1.19. Bytefence Pro is very powerful Anti malware. I am also use it  believe me it very friendly and very fast search. If you want setup of ByteFence click here