Open jira-importer opened 5 years ago
Hi,
I have the same issue. I generate a key with this method :
ssh-keygen -t rsa -b 4096
And i use ssh-copy-id :
ssh-copy-id -i .ssh/id_rsa.pub jenkins@hakael.secu.loc
If i made an ssh -i id_rsa jenkins@hakael.secu.loc, it's works but if i use the test in the configuration console, it failed, always.
The solution for me was to export my private key in different format using puttygen- look at description in https://stackoverflow.com/questions/2224066/how-to-convert-ssh-keypairs-generated-using-puttygen-windows-into-key-pairs-us
I had the same issue and solved.
The problem is private key file format.
This is my private key header. This is from ssh-keygen on Macbook, not from puttygen.
-----BEGIN OPENSSH PRIVATE KEY----- b3Blb....
"BEGIN OPENSSH" and "b3Blb...." means the "newer OpenSSH format".
Jenkins or plugin failed to read this format.
If you want to make "older" OpenSSH format, try this.
Or make your keys by using old ssh-keygen.
ssh-keygen -t rsa -b 4096 -m PEM
Your new private key should looks like this.
-----BEGIN RSA PRIVATE KEY----- MIIE....
ps. You can't use ed25519 algorithm. Because ed25519 needs newer format.
Taehyung Lim's workaround solved the issue for me. It would be great to be able to support the new format and the ed25519 algo though.
The publish over ssh plug does not accept a newly generated openssh (7.9-p1)
Use ssh-copy-id to copy the newly generated ssh key to the desired destination server.
Navigate to Configure Jenkins
Set the passphrase and path to key to blank.
Set the key to the above text
Set ssh server name, hostname, and remote directory as appropriate
Click "Test Configuration".
Expected behavior, the test either works, or tells me that it's unable to authenticate against the target server.
Actual behavior:
I get this message.
Subsequent activation of the "Test Configuration" button give me the same message, but with a different hex code at the end.
Originally reported by jonesmzmeshpp, imported from: Publish with ssh plugin does not work with openssh key