0

I've checked several threads regarding CLI access:

And unfortunately it's not my case.

I'm trying to run the following command:

java.exe -jar jenkins-cli.jar -i C:\Users\myuser\.ssh\id_rsa -s http://MasterJenkins:port/ list-jobs All 

And I'm getting the following execption:

Exception in thread "main" java.io.EOFException
    at java.io.DataInputStream.readBoolean(DataInputStream.java:244)
    at hudson.cli.Connection.readBoolean(Connection.java:93)
    at hudson.cli.CLI.authenticate(CLI.java:565)
    at hudson.cli.CLI._main(CLI.java:476)
    at hudson.cli.CLI.main(CLI.java:387)

Going to : http://MasterJenkins:port/me/configure I made sure that the "SSH Public Keys" section is the same key I have in my public key. I was a month abroad, before leaving it worked, now it doesn't and my team member swears nothing changed in the system.

Any ideas?

Community
  • 1
  • 1
Dvir669
  • 6,577
  • 1
  • 20
  • 21

1 Answers1

-1

I had a similar issue last week with my own ssh private/public key.

I fixed it by

Generating a new public/private key combination using ssh-keygen

bash-4.1$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/users/xxxxx/.ssh/id_rsa): JenkinsCLI Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in JenkinsCLI. Your public key has been saved in JenkinsCLI.pub. The key fingerprint is: f6:4c:be:fc:cb:cd:d3:ee:8c:80:26:a2:57:df:67:14 xxxxx@eeeee The key's randomart image is: +--[ RSA 2048]----+

  • Private file

Copy and paste the content of JenkinsCLI in your .private file

  • Public file log into Jenkins>Click your Login id dropdown>Configure>SSH Public Keys

copy and paste the content of JenkinsCLI.pub file into SSH Public Keys text area enter image description here

You should be able to authenticate.

upHiller
  • 936
  • 2
  • 9
  • 14