This is my note for add jenkins-agent using ssh

  1. Create new node at jenkins dashboard and setting directory for root directory file for storing your deployment
  2. Choose Launch Agent via ssh
  3. Add host for remote agent
  4. Choose Jenkins credential > SSH Username with private key
  5. Add login vm username
  6. Add credential > copy your id ~/.ssh/id_rsa to private key
  7. Host key verification choose Non
  8. and dont forget to copy you id_rsa.pub to remote ~/.ssh/authorized_keys
  9. Dont forget install java because agent using java “sudo apt install openjdk-17-jdk”
  10. Thats it and dont forget to see your log