Transfers
Transfer Configuration

Validate remote server's SSH credentials

This function checks the SSH credentials on the remote server.

Authentication

There are several methods that you can use to authenticate a transfer session with the remote server.

PermitRootLogin=Yes

The simplest authentication method is to use the root user and password. To do this, the sshd_config file on the remote server must contain the following value: PermitRootLogin=Yes

The following table displays the correct parameters and values for this authentication method:

ParameterValue
userroot
passwordroot's password.

You can also use the SSH Public Key to authenticate the root user. If the SSH Public Key is encrypted, include the SSH Key's passphrase.

The following table displays the correct parameters and values for this authentication method:

ParameterValue if the SSH Key is not encryptedValue if the SSH Key is encrypted
userrootroot
sshkey_nameroot's SSH key name.root's SSH key name.
sshkey_passphrase(none)root's SSH key passphrase.

PermitRootLogin=No

Many server administrators do not permit direct root logins on their servers.

  • If the remote server contains PermitRootLogin=No in the sshd_config file, then you must use another user and their password on the remote server, and then escalate to root.
  • If the system administrator used WHM's Manage Wheel Group Users interface (WHM >> Home >> Security Center >> Manage Wheel Group Users) to grant the user su access, then you will need to specify su and the root password.
  • If the user has sudo access, you do not need the root password.

The following table displays the correct parameters and values for this authentication method:

ParameterValue if the user has sudo accessValue if the user has su access
userThe user's username.The user's username.
passwordThe user's password.The user's password.
root_escalation_methodsudosu
root_password(none)root's password.

You can also use an SSH Public Key instead of a password to authenticate that user. If the SSH Public Key is encrypted, include the SSH Key's passphrase.

The following table displays the correct parameters and values for this authentication method:

Parametersudosu
userThe user's username.The user's username.
sshkey_nameThe user's SSH key name.The user's SSH key name.
sshkey_passphrase (If encrypted)The user's SSH key passphrase.The user's SSH key passphrase.
root_escalation_methodsudosu
root_password(none)root's password.
get/remote_basic_credential_check

Query parameters

string ipv4 required

A valid IP address.

OR
string domain required

A valid domain.

Example:192.168.0.0

The remote server's hostname or IP address.

userstring username required
Example:root

The username to use to connect to the remote server.

passwordstring
Example:123456luggage

The username's password.

portinteger
Example:22

The remote server's SSH port number.

root_escalation_method'su' | 'sudo'
Example:sudo

The escalation method to use to connect to the remote server.

  • su
  • sudo

Note:

Use this parameter if PermitRootLogin=No in the remote server's sshd_config file.

root_passwordstring
Example:123456luggage

root's password on the remote server.

Note:

Use this parameter if PermitRootLogin=No in the remote server's sshd_config file and the root_escalation_method value is set to su.

sshkey_namestring
Example:FrancisScott

The SSH key's name.

Note:

SSH keys are available in WHM's Manage root's SSH Keys interface (WHM >> Home >> Security Center >> Manage root’s SSH Keys).

sshkey_passphrasestring
Example:kkwtoowoygidsa

The SSH key's passphrase.

Note:

Use this parameter if the SSH Key is encrypted.

Response

HTTP Request was successful.

Example response

{
  "data": {
    "output": "Basic credential check…\nDone\n",
    "response": "basic credential check\n"
  },
  "metadata": {
    "command": "remote_basic_credential_check",
    "reason": "Success",
    "result": 1,
    "version": 1
  }
}