jenkinsci / publish-over-ssh-plugin

https://plugins.jenkins.io/publish-over-ssh/
115 stars 150 forks source link

jenkins.plugins.publish_over.BapPublisherException #257

Open svasylenkiv opened 2 years ago

svasylenkiv commented 2 years ago

Describe your use-case which is not covered by existing documentation.

jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [test2]. Message [Auth fail]]

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

danparisd commented 2 years ago

Looks like this is covered over here: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/247

abs2310 commented 2 years ago

Starting with Ubuntu 22 "ssh client in Ubuntu 22.04 with the RSA public-private key pair is considered not safe any more." I referred to https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04 and added PubkeyAcceptedKeyTypes +ssh-rsa to /etc/ssh/sshd_config and restarted sshd service using "sudo systemctl restart sshd" This resolved the publish over ssh issue.

longfeiwlf commented 1 year ago

Starting with Ubuntu 22 "ssh client in Ubuntu 22.04 with the RSA public-private key pair is considered not safe any more." I referred to https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04 and added PubkeyAcceptedKeyTypes +ssh-rsa to /etc/ssh/sshd_config and restarted sshd service using "sudo systemctl restart sshd" This resolved the publish over ssh issue.

@abs2310 Thanks! Just tried this hack on my remote server, successfully past the configuration test, works for me.

brincob commented 1 year ago

Starting with Ubuntu 22 "ssh client in Ubuntu 22.04 with the RSA public-private key pair is considered not safe any more." I referred to https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04 and added PubkeyAcceptedKeyTypes +ssh-rsa to /etc/ssh/sshd_config and restarted sshd service using "sudo systemctl restart sshd" This resolved the publish over ssh issue.

This issue is not resolved, It works with public ip address but not with private ip address

abs2310 commented 1 year ago

Starting with Ubuntu 22 "ssh client in Ubuntu 22.04 with the RSA public-private key pair is considered not safe any more." I referred to https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04 and added PubkeyAcceptedKeyTypes +ssh-rsa to /etc/ssh/sshd_config and restarted sshd service using "sudo systemctl restart sshd" This resolved the publish over ssh issue.

This issue is not resolved, It works with public ip address but not with private ip address

@brincob Not sure how are you accessing servers. My Server is hosted in Cloud and am able to communicate to other servers using private IP address. Under Jenkins --> Manage Jenkins --> Configure System --> Publish over SSH --> SSH Servers. Here we have configured all the Servers with Private internal names and not private IP address published by Cloud provider and it still works. Try testing the configuration from here.