How to set ssh key exchange algorithm when using Publish Over SSH plugin?

2,768 views
Skip to first unread message

zil...@gmail.com

unread,
Jun 1, 2023, 1:12:38 PM6/1/23
to Jenkins Users
I'm using the Publish Over SSH plugin t6o upload files to our SFTP site. I'm getting this error

ERROR: Exception when publishing, exception message [Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [ftp.company.com]. Message [Algorithm negotiation fail: algorithmName="server_host_key" jschProposal="ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256" serverProposal="ssh-rsa"]]]


In spite of me having this in C:\Users\myUser\.ssh\config
and in C:\Windows\system32\...\.ssh\config

User myUser
HostName ftp.company.com
HostKeyAlgorithms=+ssh-rsa

One explanation is the plugin doesn't use either config file. What am I missing? TIA

Chris

Alex Earl

unread,
Jun 1, 2023, 1:44:37 PM6/1/23
to jenkins...@googlegroups.com
You are correct, the plugin does not use either config file (or any config file for that matter). It looks like Jsch (the SSH library used) does not support ssh-rsa anymore. You would need to setup one of the other host key types (ssh-ed25519 would probably be best) on the server.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bb93300f-68ee-46e9-9ae7-f4ed7ec12306n%40googlegroups.com.


--

Dirk Heinrichs

unread,
Jun 2, 2023, 5:29:00 AM6/2/23
to jenkins...@googlegroups.com
Am Donnerstag, dem 01.06.2023 um 10:44 -0700 schrieb Alex Earl:

You are correct, the plugin does not use either config file (or any config file for that matter). It looks like Jsch (the SSH library used) does not support ssh-rsa anymore. You would need to setup one of the other host key types (ssh-ed25519 would probably be best) on the server.


Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
Reply all
Reply to author
Forward
0 new messages