Skip to content

Instantly share code, notes, and snippets.

@y-fedorov
Created August 25, 2016 11:33
Show Gist options
  • Save y-fedorov/07d6db81484c7964eb02e12f7afca865 to your computer and use it in GitHub Desktop.
Save y-fedorov/07d6db81484c7964eb02e12f7afca865 to your computer and use it in GitHub Desktop.
% ssh -l latistaadmin <Build host IP>
# sudo -i
# apt-get update
# apt-get -f install
# useradd -m jenkins -d /var/jenkins -r -U
# su jenkins
$ cd /var/jenkins
$ ssh-keygen -t rsa -b 4096 -C "SSH KEY for Jenkins server"
passphrase: <Pass phrase>
Your identification has been saved in /var/jenkins/.ssh/id_rsa.
Your public key has been saved in /var/jenkins/.ssh/id_rsa.pub.
$ mv /var/jenkins/.ssh/id_rsa.pub /var/jenkins/.ssh/authorized_keys
$ chmod 600 /var/jenkins/.ssh/authorized_keys
$ cat /var/jenkins/.ssh/id_rsa
{copy and paste to credentials manager on Jenkins Master}
$ rm -f /var/jenkins/.ssh/id_rsa
$ rm -f /var/jenkins/.ssh/id_rsa.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment