appleboy / drone-ssh

Drone plugin for executing remote ssh commands
MIT License
260 stars 77 forks source link

Broken with latest openssh server #183

Open gilesbradshaw opened 2 years ago

gilesbradshaw commented 2 years ago

I can make this work with a server running

$ dpkg --list openssh-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version         Architecture Description
+++-==============-===============-============-=================================================================
ii  openssh-server 1:8.0p1-6build1 amd64        secure shell (SSH) server, for secure access from remote machines

but not

$ dpkg --list openssh-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================================================
ii  openssh-server 1:8.9p1-3    amd64        secure shell (SSH) server, for secure access from remote machines

only difference i can see is the server version. I have authorized_keys configured the same on both servers

ssh -p 2022 giles@failedserver

works fine but

docker run --rm   -e PLUGIN_HOST=failedmachine   -e PLUGIN_USERNAME=giles   -e PLUGIN_KEY="$(cat ${HOME}/.ssh/id_rsa)" -e PLUGIN_PORT=2022   -e PLUGIN_SCRIPT=whoami   -v $(pwd):$(pwd)   -w $(pwd)   appleboy/drone-ssh

does not

whereas both work using workingserver

gilesbradshaw commented 2 years ago

I've tested it against https://hub.docker.com/r/linuxserver/openssh-server images and it works with a server up to version-8.6_p1-r3 then it starts failing after that.

appleboy commented 10 months ago

I will take it.