Azure Devops Pipeline ssh@0 task doesn't work

Joty Zhou (US) 0 Reputation points
2024-04-23T09:01:02.2833333+00:00

I can login my azure agent use account (username and password) ssh to destination vm manaully

but when i want to use azure pipeline to do this action it show
##[error]Failed to connect to remote machine. Verify the SSH service connection details. Error: Error: All configured authentication methods failed

here is full logs

  1. ##[debug]system.culture=en-US ##[debug]sshEndpoint=64c07a95-edaa-491d-8966-67927a3aa56e ##[debug]interactiveKeyboardAuthentication=false ##[debug]64c07a95-edaa-491d-8966-67927a3aa56e auth param username = *** ##[debug]64c07a95-edaa-491d-8966-67927a3aa56e auth param password = *** ##[debug]64c07a95-edaa-491d-8966-67927a3aa56e data host = xxx.xxx.xxx.xxx ##[debug]64c07a95-edaa-491d-8966-67927a3aa56e data port = 22 ##[debug]interactiveSession=false ##[debug]readyTimeout=20000 ##[debug]Using username and password for ssh connection. ##[debug]runOptions=commands ##[debug]commands=echo "hello world" ##[debug]failOnStdErr=true Trying to establish an SSH connection to ***@xxx.xxx.xxx.xxx:22 ##[debug]task result: Failed ##[error]Failed to connect to remote machine. Verify the SSH service connection details. Error: Error: All configured authentication methods failed
    at doNextAuth (/xxxx/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/client.js:865:21)
    
    at tryNextAuth (/xxxx/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/client.js:1082:7)
    
    at USERAUTH_FAILURE (/xxxx/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/client.js:430:11)
    
    at 51 (/xxxx/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/protocol/handlers.misc.js:408:16)
    
    at Protocol.onPayload (/xxxxx/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/protocol/Protocol.js:2059:10)
    
    at AESGCMDecipherNative.decrypt (/data/ado-agent/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/protocol/crypto.js:987:26)
    
    at Protocol.parsePacket [as _parse] (/data/ado-agent/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/protocol/Protocol.js:2028:25)
    
    at Protocol.parse (/xxxx/myagent1/_work/_tasks/SSH_91443475-df55-4874-944b-39253b558790/0.238.1/node_modules/ssh2/lib/protocol/Protocol.js:313:16)
    
    at Socket.
    
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,144 questions
0 comments No comments
{count} votes