microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

[BUG]: Cannot establish connection with Solaris using a SSH-2 RSA Key #19067

Open krenson opened 12 months ago

krenson commented 12 months ago

Task name

CopyFilesOverSSH

Task version

0.221.0

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Solaris 11.4.61.151.2

Task log

Starting: CopyFilesOverSSH
==============================================================================
Task         : Copy files over SSH
Description  : Copy files or build artifacts to a remote machine over SSH
Version      : 0.221.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/copy-files-over-ssh
==============================================================================
Setting up SSH service connection to remote host suntwl1.forem.be.
##[error]Error: Failed to connect to remote machine. Verify the SSH service connection details. Failed to connect to remote machine. Verify the SSH service connection details. Error: All configured authentication methods failed..
Finishing: CopyFilesOverSSH

Relevant log output

##[error]Error: Failed to connect to remote machine. Verify the SSH service connection details. Failed to connect to remote machine. Verify the SSH service connection details. Error: All configured authentication methods failed..

Aditional info

Please find the scenarios:

1. Under Azure Devops and using an SSH service connection with a SSH2-RSA key
KO : accessing a Solaris 11.4.61.151.2 machine with OpenSSL 1.0.2zh (30 May 2023)
OK : accessing a Solaris 11.4.52.132.2 machine with OpenSSL 1.0.2zf (21 Jun 2022)

2. OK : Using the same key and trying to access the Solaris 11.4.61.151.2 machine in command line (ssh -i private.ppk username@hostname

The task SSH@0 suffers likely from the same bug. I did not try yet.

Many thanks
ivanduplenskikh commented 12 months ago

Hi @krenson thanks for reporting! We are working on more prioritized issues at the moment, but will get back to this one soon.

krenson commented 12 months ago

Hi @ivanduplenskikh , thank you so much for your feedback.

Looking forward to hearing from you soon then.

Kind regards

krenson commented 8 months ago

Hi @ivanduplenskikh, happy new year!

The bug got really disturbing in the meantime. We actually are experiencing a security issue since we had to setup our OS to accept SSH1 keys as a workaround. May I kindly ask your team to take action on both components?

Thank you so much :-)

Kind regards

michaeljurek commented 8 months ago

Hi @ivanduplenskikh We have the same problem. After some research, we have found out that ssh2 library that copy-files-over-ssh is using is obsolete, see here For the ssh task, it has been bumped but is probably still not current see here. It should be easy to fix this bug.