IT Knowledgebase
< All Topics
Print

How to use SSH to log in to the command line

Many system administration tasks and some website administration tasks require that you access the server from the command line interface (CLI). For example, if you need to run a script, you must do this from the CLI.

Note:

Your hosting provider controls who can log in via the command line and what permissions are available. If you need CLI access, contact your hosting provider. 

To use SSH to log in to the server, perform the following steps:

  1. Open your preferred CLI application. For example, Apple users often use the Terminal application to access the CLI.
  2. Run the following command, where user represents your username on the server, and hostname represents the server’s hostname or IP address: sshuser@hostname
  3. Enter your password and press the Enter key.

The working directory that you access immediately after you log in depends on your system’s configuration and the permissions that you possess on the server.

Note:

To determine which user you logged in as on the CLI, run the following command:

whoami

This command returns the name of the currently-authenticated user, or it returns root if you used the sudo command to escalate your privileges.

Ref :  https://documentation.cpanel.net/pages/viewpage.action?pageId=2719926#HowtoAccesscPanel&WHMServices-cpaneladvanced

Messenger