Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH authentication in Artifactory

I tried reading Artifactory user guide but the instructions on SSH authentication were not clear. Can someone explain how to do SSH authentication in Artifactory?

like image 544
Drithin Avatar asked Feb 07 '17 20:02

Drithin


People also ask

How do I SSH into an Artifactory?

For example, on a Linux-based system, you could execute the following command. Next, to configure Artifactory for SSH authentication, go to the Administration module, select Artifactory | Security | Keys Management and click the SSH Keys tab. Fill in the details for the Server Settings and the Server Keys.

How do you authenticate Artifactory?

Artifactory offers the option for authentication through access tokens. An access token may be assigned to a user, or to an entity that is not an Artifactory user such as a job in a CI server. Permissions are assigned to access tokens by including them in Groups.

What is Artifactory authentication?

Basic Authentication Artifactory provides a detailed and flexible permission-based system to control users' access to different features and artifacts.


1 Answers

Actually, enabling SSH on Artifactory is fairly straight forward, the client is what may require some additional debugging if it is unable to connect for any reason. The steps for enabling SSH on Artifactory are available in the online documentation for SSH Integration. You simply need to create a key pair on any machine with ssh-keygen installed (most linux distros will have this by default), then click on Admin, select Security -> SSH Server, click Enable SSH and add in the private and public key just created. Select a port and set the custom base url if necessary and Save.

Now, the user in Artifactory that wishes to authenticate with SSH needs to add his public key to his profile. This can be done by simply logging in and clicking your username in the top right corner of Artifactory. Under this section, you will need to add your password again and then you can simply paste the public key in the SSH section, you can read about this process in Updating Your Profile.

That's it, Artifactory is now ready for SSH for that particular user, and any other user can add their public key to their profile to use SSH authentication.

Configuring the client depends on which client you are attempting to setup. The most common use case is GitLFS, so I will share some documentation for setting up Git LFS with SSH to Artifactory.

Most of what you need to setup Git LFS can be found in JFrog's Git LFS Repository Authenticating with SSH documentation, or in JFrog's public solution on Git LFS Authentication. The latter contains an example of what the git config file should look like and also contains relevant information on setting up SSH authentication with an nginx reverse proxy (if you have one configured and running).

If this doesn't answer your question, can you please provide some more details on which client you are using to authenticate and specifically what is not working (any relevant error messages or log output), both Artifactory and client-side.

like image 88
Daniel Augustine Avatar answered Sep 23 '22 06:09

Daniel Augustine