CLI: How to Configure JFrog CLI to Work with SSH Authentication?

CLI: How to Configure JFrog CLI to Work with SSH Authentication?

AuthorFullName__c
Kfir Avraham
articleNumber
000004214
ft:sourceType
Salesforce
FirstPublishedDate
2018-07-06T14:11:12Z
lastModifiedDate
2021-05-03
VersionNumber
6
In order to configure the CLI client and Artifactory to work with SSH Authentication please perform the following steps:
 
  1. Upload the private and public keys to Artifactory - in Artifactory UI navigate to the Administration Tab → Security | SSH Server, Enable SSH Authentication, fill in the required fields and upload your private and public keys:

User-added image

More information on SSH server configuration is available HERE.
  1. In Artifactory UI, click on the user name and on Edit Profile (in the top right corner) and add your public key in the SSH Public Key (RSA) field.

User-added image
            More information on User Profile setup and settings is available HERE.

  1. If you are using Self-signed Certificates, place them in the “security” directory (located in ‘.jfrog’ directory under your user home directory), in case this directory does not exists, create it.
            More information on the CLI for JFrog Artifactory is available HERE.
  1. Configure the CLI client - this can be done for example by the executing the command $jfrog rt c
$ jfrog rt c
Artifactory URL: ssh://test.com:1339/
Artifactory server ID [Default-Server]:
SSH key file path: ~/.ssh/id_rsa

More information on Authenticating with RSA Keys, among other options, is available HERE.
  1. Test the configuration with a CLI command. For example:
$ jfrog rt u test.txt "generic-local/"
[Info] Performing SSH authentication...
[Info] SSH authentication successful.
[Info] [Thread 2] Uploading artifact: test.txt
[Info] Uploaded 1 artifacts.