EN
Jenkins SSH keys default location
1 points
Quick solution:
xxxxxxxxxx
1
/var/lib/jenkins/.ssh
Default Jenkins public ssh key location:
xxxxxxxxxx
1
/var/lib/jenkins/.ssh/id_rsa.pub
Default Jenkins private ssh key location:
xxxxxxxxxx
1
/var/lib/jenkins/.ssh/id_rsa
Full list of files from default SSH keys location for jenkins user:
xxxxxxxxxx
1
[root@localhost ~]# cd /var/lib/jenkins/.ssh/
2
[root@localhost .ssh]# ls -al
3
total 16
4
drwx------. 2 jenkins jenkins 57 Dec 03 12:11 .
5
drwxr-xr-x. 19 jenkins jenkins 4096 Dec 03 12:11 ..
6
-rw-------. 1 jenkins jenkins 1675 Dec 03 12:13 id_rsa
7
-rw-r--r--. 1 jenkins jenkins 411 Dec 03 12:13 id_rsa.pub
8
-rw-r--r--. 1 jenkins jenkins 202 Dec 03 12:11 known_hosts
id_rsa.pub
- this is the key we paste to github / gitlab / bitbucket repository.
For example in case of gitlab:
- We open our repository
- Settings
- Repository
- Deploy Keys
- Create a new deploy key for this project
- We give some Title and paste id_rsa.pub to Key textarea and press Add key