Languages
[Edit]
EN

Jenkins SSH keys default location

1 points
Created by:
martineau
1170

Quick solution:

/var/lib/jenkins/.ssh

Default Jenkins public ssh key location:

/var/lib/jenkins/.ssh/id_rsa.pub

Default Jenkins private ssh key location:

/var/lib/jenkins/.ssh/id_rsa

Full list of files from default SSH keys location for jenkins user:

[root@localhost ~]# cd /var/lib/jenkins/.ssh/
[root@localhost .ssh]# ls -al
total 16
drwx------.  2 jenkins jenkins   57 Dec 03 12:11 .
drwxr-xr-x. 19 jenkins jenkins 4096 Dec 03 12:11 ..
-rw-------.  1 jenkins jenkins 1675 Dec 03 12:13 id_rsa
-rw-r--r--.  1 jenkins jenkins  411 Dec 03 12:13 id_rsa.pub
-rw-r--r--.  1 jenkins jenkins  202 Dec 03 12:11 known_hosts

Add SSH keys to our repository

id_rsa.pub - this is the key we paste to github / gitlab / bitbucket repository.

For example in case of gitlab:

  1. We open our repository
  2. Settings
  3. Repository
  4. Deploy Keys
  5. Create a new deploy key for this project
  6. We give some Title and paste id_rsa.pub to Key textarea and press Add key
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join