In order to configure the CLI client and Artifactory to work with SSH Authentication please perform the following steps:
-
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:
More information on SSH server configuration is available HERE.
- 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.
More information on User Profile setup and settings is available HERE.
-
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.
-
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.
-
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.