SSH Access | cPanel & WHM Documentation (2024)

SSH Access

SSH Access | cPanel & WHM Documentation (1)

Valid for versions 82 through the latest version

Version:

82

Last modified: May 29, 2024

Overview

This interface provides information about how to connect to another web server via the SSH (secure shell) network protocol.

The SSH network protocol allows you to connect to another web server over the internet via a command line interface (CLI). You can use this network protocol to remotely manage your server, configure CGI scripts, and perform other tasks.

Many modern operating systems, such as macOS® and Linux® distributions, include SSH. If you use Microsoft Windows® to connect to your server, you must use an SSH client, such as PuTTY, to log in to your server.

Many Unix-based operating systems include standardized commands. For a list of standardized Unix-based (POSIX) commands, read the GNU Coreutils documentation.

Note:

Not all hosting providers allow shell access.

Connect to your server via SSH

  • PuTTY
  • PuTTY and a private key
  • macOS or Linux

To use PuTTY to connect to your server via SSH, perform the following steps:

  1. Download and install the PuTTY client.
  2. From the Windows Start menu, open the client.
  3. In the Session interface, enter the hostname or IP address of the server in the Host Name (or IP address) text box (for example, 192.0.2.0).
  4. Enter the port number in the Port text box (for example, 22).
  5. Select the SSH protocol.
  6. Click Open.
  7. Enter your cPanel account’s username.
  8. Enter your cPanel account’s password.

To log in to a server via SSH with PuTTY and a public key, perform the following steps:

  1. From the Windows Start menu, open the client.
  2. Navigate to the PuTTY Key Generator interface.
  3. Under the Actions heading, click Generate. PuTTY will generate the key and display the result under the Key menu.
  4. Copy the public key and paste it in the .ssh/authorized_keys file.
  5. Enter a passphrase in the Key passphrase and Confirm passphrase text boxes.
  6. Click Save private key and save the key as a .ppk file.
  7. In the Session interface, from the Saved Sessions menu, select your preferred authorization session and click Load.
  8. Navigate to the Auth interface under the SSH category.
  9. Click Browse, select the private key file to upload, and click Open.
  10. Navigate to cPanel’s Manage SSH Keys interface (Home » Security » SSH Access » Manage SSH Keys) and import the server’s keys.

Log in with a Password

To log in to your server with a password via SSH using macOS or Linux, perform the following steps:

  1. Open a Terminal session.
  2. Run the following command: ssh -p port user@IP where port represents the port number, user represents your username, and IP represents your IP address. For example:
    user@workstation:~$ ssh -p 22 [emailprotected]
  3. Enter your password.

The password login process is similar to the following example:

1234
user@workstation:~$ ssh -p 22 [emailprotected][emailprotected]'s password:Last login: Wed Dec 9 08:31:49 2020 from 192.0.3.33[[emailprotected] ~]#

Log in with a SSH Key

To log in to your server with a password via SSH using macOS or Linux, perform the following steps:

  1. Open a Terminal session.
  2. Run the following command: ssh -p port -i ssh-key user@IP where port represents the port number, ssh-key represents the file path to your SSH key, user represents your username, and IP represents your IP address. For example:
    user@workstation:~$ ssh -p 22 -i /Users/example/.ssh/mykey [emailprotected]
  3. Enter your SSH key password. If you did not set a password when you created the SSH key, press Enter when the system prompts you for a password.

The SSH Key login process is similar to the following example:

1234
user@workstation:~$ ssh -p 22 -i /Users/example/.ssh/mykey [emailprotected][emailprotected]'s password:Last login: Tue Dec 8 13:54:10 2020 from 192.0.3.33[[emailprotected] ~]#

Manage SSH keys

This section of cPanel’s SSH Access interface allows you to create, import, manage, and remove SSH keys. The system will use these keys when you confirm that a specific computer has the right to access your website’s information with SSH.

Generate a New Key

Use this section of the interface to create new SSH key pairs, which include a public key and a private key.

To generate a new SSH key pair, perform the following steps:

  1. Click Manage SSH Keys.
  2. Click Generate a New Key.
  3. To use a custom key name, enter the key name in the Key Name (This value defaults to id_rsa): text box.

    Note:

    If you use a custom key name, you must manually specify the SSH key when you log in to the server.

  4. Enter and confirm the new password in the appropriate text boxes.

    Note:

    • This step is optional if your hosting provider sets the SSH Keys setting to 0 in WHM’s Password Strength Configuration interface (WHM » Home » Security Center » Password Strength Configuration).
      • The system evaluates the password that you enter on a scale of 100 points. 0 indicates a weak password, while 100 indicates a very secure password.
      • Some web hosts require a minimum password strength. A green password Strength meter indicates that the password is equal to or greater than the required password strength.
      • Click Password Generator to generate a strong password. For more information, read our documentation.
  5. Select the desired key type.
    • DSA keys provide quicker key generation and signing times.
    • RSA keys provide quicker verification times.
  6. Select the desired key size.

    Note:

    Greater key sizes provide more security, but they result in larger file sizes and slower authentication times.

  7. Click Generate Key. The interface will display the saved location of the key.

    Important:

    For the new SSH key to function, you must authorize the SSH key. For more information, read the Manage your keys section.

Import Key

To import an existing SSH key, perform the following steps:

  1. Click Manage SSH Keys.
  2. Click Import Key.
  3. To use a custom key name, enter the key name in the Choose a name for this key (defaults to id_dsa) text box.

    Important:

    If you use a custom key name, you must manually specify the SSH key when you log in to the server.

  4. Paste the public and private keys into the appropriate text boxes.
  5. Click Import.

Manage your keys

The Public Keys and Private Keys tables display the following information about your existing keys:

  • Name — The key’s name. Public and private keys use the same key name.
  • Authorization Status — Whether you authorized the key.

    Important:

    You must authorize new keys before you attempt to use them.

    Note:

    This column only displays in the Public Keys table.

  • Actions — You can perform the following actions:
    • Delete Key — Click to delete the key, and then click Yes to confirm that you wish to delete the key.
    • View/Download — Click to view or download the key. To download the key, save the contents of the Public SSH Key text box to your computer.
    • Manage — Click to manage authorization for the key. A new interface will appear. Click Authorize to authorize the key, or Deauthorize to revoke authorization for the key.

      Note:

      • You can only perform this action for public keys.
      • After you deauthorize a key, that key’s users cannot log in with the associated private key.
SSH Access | cPanel & WHM Documentation (2024)

FAQs

How to access WHM through SSH? ›

Enabling SSH through WebHost Manager (WHM)
  1. Log into WHM.
  2. Go to Account Functions.
  3. Select Modify Account.
  4. Select the account to change and click Modify.
  5. Scroll down to the bottom of the page where it shows Shell Access check box.
Jan 4, 2024

How to enable SSH access & terminal in cPanel? ›

How to authorize an SSH Key
  1. Login to the cPanel that you want to connect to using SSH.
  2. Under Security click SSH Access.
  3. Click Manage SSH Keys.
  4. On the next screen, locate the key you just created under the Public Keys section. Click Manage (under the Actions column) next to your new key.

What is the SSH port for WHM? ›

How to Change SSH Port with WHM & CSF Print
  • First, edit this file /etc/ssh/sshd_config. ...
  • Find this line #Port 22. ...
  • Restart the SSH service. ...
  • Now we must allow incoming data in the new port. ...
  • Click “Firewall Configuration” button.
  • Add your new port in “TCP_IN” and “TCP_OUT”.
  • Click “Change” button in the bottom of the page.

How to use SSH access? ›

Log in with a SSH Key
  1. Open a Terminal session.
  2. Run the following command: ssh -p port -i ssh-key user@IP where port represents the port number, ssh-key represents the file path to your SSH key, user represents your username, and IP represents your IP address. For example: ...
  3. Enter your SSH key password.
May 29, 2024

How do I get access to WHM? ›

Method 2: Launch WHM via URL
  1. Step 1: Get your server information. To get your IP address: ...
  2. Step 2: Access your WHM URL. We always recommend using a secure connection, "https," to pull up your WHM in your browser. ...
  3. Step 3: Enter your WHM username and password. On your WHM login page, enter your WHM username and password.

How to access SSH via terminal? ›

You can start an SSH session in your command prompt by executing ssh user@machine and you will be prompted to enter your password. You can create a Windows Terminal profile that does this on startup by adding the commandline setting to a profile in your settings.json file inside the list of profile objects.

How to connect to a server using SSH? ›

Connecting to your Dedicated Server via Terminal
  1. Open the terminal on your computer.
  2. Type ssh, followed by a space. ...
  3. If you see a message stating “Are you sure you want to continue connecting” type yes, then click the Enter key.
  4. You will then be prompted to enter your password.
Feb 21, 2024

What is the command to enable SSH? ›

Activate the SSH server
  1. sudo rm -f /etc/ssh/sshd_not_to_be_run sudo systemctl enable ssh sudo systemctl start ssh.
  2. sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf sudo start ssh.
  3. sudo systemctl stop ssh sudo systemctl disable ssh.
  4. sudo stop ssh sudo mv /etc/init/ssh.conf /etc/init/ssh.conf.back.
Feb 3, 2022

What is the default port for SSH in cPanel? ›

The default port for SSH is 22.

What ports do I need to login to WHM? ›

Ports
PortService
2086WHM and cPanel Licensing
2087WHM SSL and cPanel Licensing
2089cPanel Licensing
2095Webmail
36 more rows
Aug 30, 2024

How do I open port 22 in WHM? ›

Procedure
  1. Log into WHM as the 'root' user.
  2. Navigate to "Home / Plugins / ConfigServer Security & Firewall."
  3. In the "csf -ConfigServer Firewall" section, click the "Firewall Configuration" button.
  4. Scroll down to "Allow incoming TCP ports."
  5. Enter the incoming TCP port to open in the "TCP_IN" textbox.
Apr 5, 2024

How do I check SSH access? ›

To Test the SSH Setup on a Host
  1. From another host, use SSH to log in into the host that you are testing as the SSH user. $ ssh -l user-name host-name user-name. The user name for the SSH user's account on the host. ...
  2. In response to the prompt, type your password. If this step succeeds, your setup of SSH is complete.

What does SSH access mean? ›

SSH (Secure Shell or Secure Socket Shell) is a network protocol that gives users -- particularly systems administrators -- a secure way to access a computer over an unsecured network. SSH also refers to the suite of utilities that implement the SSH protocol.

How do I manage SSH access? ›

13 Best Practices for SSH Key Management
  1. Generate Strong Keys: Secure the keys by choosing strong encryption algorithms and key lengths that will be used to create SSH keys. ...
  2. Use Unique Keys for Each User: Each user should his own self key. ...
  3. Limit Access: Grant SSH access only to privileged users who need it.
Jun 13, 2024

How to access WSL through SSH? ›

Another way to connect to WSL via SSH is to forward or proxy the Windows port for SSH, such as 2022, to the WSL instance. Before starting, find the IP address of the WSL instance. Save the IP address. Run netsh from a Windows Command Prompt with Administrator privilege.

How to access VM through SSH? ›

Configuring a VM for SSH access
  1. Verify that port 22 is open on the VM operating system firewall.
  2. Install and run an SSH server. Example: OpenSSH on an Ubuntu VM. Install open SSH: sudo apt-get install openssh-server. Confirm that SSH daemon ( sshd ) is running: ps -aef | grep sshd. Try to connect: ssh localhost.

How do I access hosting via SSH? ›

Connect to your web space via an SSH client:
  1. Open your SSH client.
  2. Type ssh [email protected]. (replace one-example.com with your own domain)
  3. If this is the first time you are connecting, confirm the authenticity of the host by typing yes.
  4. Enter your password. ...
  5. Press Enter.

How can ESXI be accessed through SSH? ›

To connect to the ESX host using an SSH client:
  1. Log into ESX host as the root user with the vSphere Client.
  2. Click Users & Groups.
  3. Right-click on a blank area and click Add.
  4. Enter a username and password. ...
  5. Select Grant shell access to this user and click OK.
  6. Open your SSH client.
  7. Complete the necessary fields.
Mar 20, 2024

Top Articles
Top 11 AI Music Generators of 2024
Explained | Centralised vs decentralised government
Jack Doherty Lpsg
No Hard Feelings Showtimes Near Metropolitan Fiesta 5 Theatre
Craigslist Home Health Care Jobs
Where are the Best Boxing Gyms in the UK? - JD Sports
Hotels Near 625 Smith Avenue Nashville Tn 37203
Displays settings on Mac
Dityship
Ktbs Payroll Login
Tiger Island Hunting Club
LeBron James comes out on fire, scores first 16 points for Cavaliers in Game 2 vs. Pacers
Methodist Laborworkx
‘Accused: Guilty Or Innocent?’: A&E Delivering Up-Close Look At Lives Of Those Accused Of Brutal Crimes
Chris Hipkins Fue Juramentado Como El Nuevo Primer Ministro De...
Hijab Hookup Trendy
Jvid Rina Sauce
Kaomoji Border
Lake Nockamixon Fishing Report
Equibase | International Results
Officialmilarosee
Sizewise Stat Login
Lowes Undermount Kitchen Sinks
Apple Original Films and Skydance Animation’s highly anticipated “Luck” to premiere globally on Apple TV+ on Friday, August 5
Popular Chinese Restaurant in Rome Closing After 37 Years
Wbiw Weather Watchers
Egizi Funeral Home Turnersville Nj
Hdmovie2 Sbs
Is Holly Warlick Married To Susan Patton
Kitchen Exhaust Cleaning Companies Clearwater
Yayo - RimWorld Wiki
Pokémon Unbound Starters
HP PARTSURFER - spare part search portal
Superhot Free Online Game Unblocked
Solo Player Level 2K23
County Cricket Championship, day one - scores, radio commentary & live text
Broken Gphone X Tarkov
Most popular Indian web series of 2022 (so far) as per IMDb: Rocket Boys, Panchayat, Mai in top 10
拿到绿卡后一亩三分地
Property Skipper Bermuda
Pensacola Cars Craigslist
Kerry Cassidy Portal
Urban Blight Crossword Clue
“To be able to” and “to be allowed to” – Ersatzformen von “can” | sofatutor.com
Grand Valley State University Library Hours
Holzer Athena Portal
Neil Young - Sugar Mountain (2008) - MusicMeter.nl
Cars & Trucks near Old Forge, PA - craigslist
Unbiased Thrive Cat Food Review In 2024 - Cats.com
Jesus Calling Oct 6
Cognitive Function Test Potomac Falls
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 6173

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.