Open ombmax opened 2 years ago
I'm using Ubuntu 22.04.1 LTS and same problem occurs. It seems like ssh connection configuration has changed, and maybe recent linux distributions has same issue. OpenSSH declares ssh-rsa deprecated https://superuser.com/questions/1390593/how-to-generate-ssh-rsa-key-instead-of-rsa-sha2-512
i have fix this bug ,you can see https://github.com/jenkinsci/publish-over-ssh-plugin/pull/273
Jenkins and plugins versions report
Environment
Jenkins: 2.361.3 OS: Linux - 4.18.0-372.32.1.el8_6.x86_64 --- ace-editor:1.1 ant:475.vf34069fef73c antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61 artifactdeployer:1.2 artifactory:3.17.0 authentication-tokens:1.4 authorize-project:1.4.0 bootstrap4-api:4.6.0-5 bootstrap5-api:5.2.0-3 bouncycastle-api:2.26 branch-api:2.1046.v0ca_37783ecc5 build-timestamp:1.0.3 build-user-vars-plugin:1.8 caffeine-api:2.9.3-65.v6a_47d0f4d1fe checks-api:1.7.5 cloudbees-folder:6.740.ve4f4ffa_dea_54 command-launcher:84.v4a_97f2027398 conditional-buildstep:1.4.2 config-file-provider:3.11.1 credentials:1143.vb_e8b_b_ceee347 credentials-binding:523.vd859a_4b_122e6 display-url-api:2.3.6 distfork:1.7 docker-commons:1.21 docker-workflow:521.v1a_a_dd2073b_2e durable-task:500.v8927d9fd99d8 echarts-api:5.3.3-1 email-ext:2.91 flexible-publish:0.16.1 font-awesome-api:6.1.2-1 git:4.11.5 git-client:3.11.2 git-parameter:0.9.17 git-server:1.11 github:1.34.5 github-api:1.303-400.v35c2d8258028 github-branch-source:1694.vd46793a_c4a_57 github-pullrequest:0.4.0 gitlab-api:5.0.1-78.v47a_45b_9f78b_7 gitlab-branch-source:636.v55fd8144d335 gitlab-plugin:1.5.35 global-pre-script:20.02 gradle:1.39.4 groovy:442.v817e6d937d6c h2-api:1.4.199 handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 instance-identity:3.1 ivy:2.2 jackson2-api:2.13.3-285.vc03c0256d517 jakarta-activation-api:2.0.1-1 jakarta-mail-api:2.0.1-1 javadoc:226.v71211feb_e7e9 javax-activation-api:1.2.0-4 javax-mail-api:1.6.2-7 jaxb:2.3.6-1 jdk-tool:55.v1b_32b_6ca_f9ca jenkinslint:0.14.0 jersey2-api:2.37-1 jjwt-api:0.11.5-77.v646c772fddb_0 jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.6.0-4 jsch:0.1.55.61.va_e9ee26616e7 junit:1119.1121.vc43d0fc45561 lockable-resources:2.16 log-parser:2.2 m2release:0.16.3 mailer:435.v79ef3972b_5c7 matrix-auth:3.1.5 matrix-project:772.v494f19991984 maven-plugin:3.19 mina-sshd-api-common:2.8.0-36.v8e25ce90d4b_1 mina-sshd-api-core:2.8.0-36.v8e25ce90d4b_1 momentjs:1.1.1 naginator:1.18.1 okhttp-api:4.9.3-108.v0feda04578cf pipeline-build-step:2.18 pipeline-graph-analysis:195.v5812d95a_a_2f9 pipeline-groovy-lib:612.v84da_9c54906d pipeline-input-step:449.v77f0e8b_845c4 pipeline-maven:1195.v3b_a_d1b_e792e0 pipeline-milestone-step:101.vd572fef9d926 pipeline-model-api:2.2114.v2654ca_721309 pipeline-model-definition:2.2114.v2654ca_721309 pipeline-model-extensions:2.2114.v2654ca_721309 pipeline-rest-api:2.24 pipeline-stage-step:296.v5f6908f017a_5 pipeline-stage-tags-metadata:2.2114.v2654ca_721309 pipeline-stage-view:2.24 plain-credentials:139.ved2b_9cf7587b plugin-usage-plugin:3.0 plugin-util-api:2.17.0 popper-api:1.16.1-3 popper2-api:2.11.6-1 postbuild-task:1.9 publish-over:0.22 publish-over-ssh:1.24 resource-disposer:0.20 role-strategy:561.v9846c7351a_41 run-condition:1.5 saml:2.333.vc81e525974a_c scm-api:621.vda_a_b_055e58f7 script-security:1175.v4b_d517d6db_f0 snakeyaml-api:1.31-84.ve43da_fb_49d0b sonar:2.14 ssh:2.6.1 ssh-credentials:305.v8f4381501156 ssh-slaves:1.834.v622da_57f702c ssh-steps:2.0.39.v831c5e6468b_c ssh2easy:1.4 sshd:3.242.va_db_9da_b_26a_c3 structs:324.va_f5d6774f3a_d text-file-operations:1.3.2 timestamper:1.19 token-macro:308.v4f2b_ed62b_b_16 trilead-api:1.67.vc3938a_35172f validating-string-parameter:2.8 variant:59.vf075fe829ccb workflow-aggregator:590.v6a_d052e5a_a_b_5 workflow-api:1192.v2d0deb_19d212 workflow-basic-steps:994.vd57e3ca_46d24 workflow-cps:2759.v87459c4eea_ca_ workflow-durable-task-step:1199.v02b_9244f8064 workflow-job:1207.ve6191ff089f8 workflow-multibranch:716.vc692a_e52371b_ workflow-scm-step:400.v6b_89a_1317c9a_ workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:838.va_3a_087b_4055b ws-cleanup:0.43What Operating System are you using (both controller, and any agents involved in the problem)?
Red Hat Enterprise Linux release 8.6 (Ootpa)
Reproduction steps
Expected Results
Success
Actual Results
jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [CL5605]. Message [Auth fail]]
ON REMOTE SERVER (/var/log/secure) Nov 9 17:38:19 CL5605-APP sshd[576381]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedKeyTypes [preauth] Nov 9 17:38:19 CL5605-APP sshd[576381]: error: Received disconnect from fdde:68d2:461a:2:1113:5:a:2 port 50190:3: com.jcraft.jsch.JSchException: Auth fail [preauth] Nov 9 17:38:19 CL5605-APP sshd[576381]: Disconnected from authenticating user sJenkin2 fdde:68d2:461a:2:1113:5:a:2 port 50190 [preauth]
Anything else?
No response