scp-action
scp-action copied to clipboard
SCP Proxy Not working - SSH Handshake Failed
Hi,
I am getting the following error when attempting to SCP a file using a jump host (proxy):
error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
More details from that output:
Run appleboy/scp-action@master
with:
host: ***
username: ***
key: ***
port: ***
proxy_host: ***
proxy_username: ***
proxy_key: ***
proxy_port: ***
source: deploy/deploy.zip
target: ~/
use_insecure_cipher: false
proxy_use_insecure_cipher: false
timeout: 30s
command_timeout: 10m
rm: false
debug: false
strip_components: 0
overwrite: false
proxy_timeout: 30s
env:
BUILD_NUMBER: 12
redacted
tar all files into /tmp/130780587/yLVqwr7IQG.tar
scp file to server.
2020/06/30 12:57:27 error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
drone-scp error: error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
My config:
- name: Upload deploy to Webserver
uses: appleboy/scp-action@master
with:
host: ${{ secrets.WEBSERVER_HOST }}
username: ${{ secrets.WEBSERVER_USERNAME }}
key: ${{ secrets.BASTION_KEY }}
port: ${{ secrets.WEBSERVER_PORT }}
proxy_host: ${{ secrets.BASTION_HOST }}
proxy_username: ${{ secrets.BASTION_USERNAME }}
proxy_key: ${{ secrets.BASTION_KEY }}
proxy_port: ${{ secrets.BASTION_PORT }}
source: "deploy/deploy.zip"
target: "~/"
The really strange part is if I use ssh-action (https://github.com/appleboy/ssh-action) with the same config I can run commands just fine...
Here is that config:
- name: Connect to Webserver and deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.WEBSERVER_HOST }}
username: ${{ secrets.WEBSERVER_USERNAME }}
key: ${{ secrets.BASTION_KEY }}
port: ${{ secrets.WEBSERVER_PORT }}
proxy_host: ${{ secrets.BASTION_HOST }}
proxy_username: ${{ secrets.BASTION_USERNAME }}
proxy_key: ${{ secrets.BASTION_KEY }}
proxy_port: ${{ secrets.BASTION_PORT }}
script: |
ls -al
And output from that:
with:
host: ***
username: ***
key: ***
port: ***
proxy_host: ***
proxy_username: ***
proxy_key: ***
proxy_port: ***
script: ls -al
sync: false
use_insecure_cipher: false
timeout: 30s
command_timeout: 10m
proxy_timeout: 30s
proxy_use_insecure_cipher: false
script_stop: false
debug: false
======CMD======
ls -al
======END======
out: total 40
out: drwxr-xr-x 5 *** *** 4096 Jun 16 08:39 .
out: drwxr-xr-x 3 root root 4096 Jun 15 09:49 ..
out: -rw------- 1 *** *** 641 Jun 30 11:21 .bash_history
out: -rw-r--r-- 1 *** *** ***0 Apr 4 2018 .bash_logout
out: -rw-r--r-- 1 *** *** 3771 Apr 4 2018 .bashrc
out: drwx------ 2 *** *** 4096 Jun 15 10:11 .cache
out: drwx------ 3 *** *** 4096 Jun 15 10:11 .gnupg
out: -rw------- 1 *** *** 400 Jun 16 08:57 .joe_state
out: -rw-r--r-- 1 *** *** 807 Apr 4 2018 .profile
out: drwx------ 2 *** *** 4096 Jun 15 09:49 .ssh
out: -rw-r--r-- 1 *** *** 0 Jun 15 10:11 .sudo_as_admin_successful
==============================================
✅ Successfully executed commands to all host.
==============================================
Any ideas?
Thanks Ian
Hello @IanBarnesZa im also running into this issue at the moment.
drone-scp error: error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain```
I'm specifying a key, so I'm surprised at this error message
--------------------------------------------------------------------------------------------------------------
Ninja edit.
Works now. Had to clean up my ssh settings
I'm seeing the same thing, right down to the mysterious attempted methods [none]. Any chance you found a solution, @IanBarnesZa?
I got the same error but no luck for me.
I got the same issue.
The same config works in ssh-action, but scp-action failed with error "ssh: handshake failed: ssh: unable to authenticate, attempted methods [none]".
Same issue here!
Also using ssh-action and wanting to use scp-action to copy files first, but no luck.
I'm getting the same error
I'm using ssh-action with proxy and it works like a charm, but scp-action with the same configuration fails
error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
drone-scp error: error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
My configuration:
- name: copy file via ssh key
uses: appleboy/scp-action@master
with:
host: ${{ secrets.TEST_SERVER_HOST }}
username: ${{ secrets.TEST_SERVER_USERNAME }}
password : ${{ secrets.TEST_SERVER_PASSWORD }}
proxy_host: ${{ secrets.JUMP_SERVER_HOST }}
proxy_username: ${{ secrets.JUMP_SERVER_USERNAME }}
proxy_key: ${{ secrets.JUMP_SERVER_KEY }}
proxy_passphrase: ${{ secrets.JUMP_SERVER_KEY_PASSPHRASE }}
source: "docker-compose.yml,.env"
target: ${{ env.DEPLOYMENT_PATH }}
- name: Executing remote ssh commands using ssh key
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.TEST_SERVER_HOST }}
username: ${{ secrets.TEST_SERVER_USERNAME }}
password : ${{ secrets.TEST_SERVER_PASSWORD }}
proxy_host: ${{ secrets.JUMP_SERVER_HOST }}
proxy_username: ${{ secrets.JUMP_SERVER_USERNAME }}
proxy_key: ${{ secrets.JUMP_SERVER_KEY }}
proxy_passphrase: ${{ secrets.JUMP_SERVER_KEY_PASSPHRASE }}
script: pwd
@manuel-cid I will take it. I will find out what's different between scp-action and ssh-action.
@appleboy is there any update?
I also had the same error. I was using cat ~/.ssh/key.pem to view the key on terminal. Then, i was copying the key and creating the secret. I was able see the output similar to
-----BEGIN RSA PRIVATE KEY-----
wvqgvreh rebrtykrb8k78kbbk5bn578bn5...
-----END RSA PRIVATE KEY-----%
The problem was with the % at the end. After removing the %, the error was gone.
Hello. For me, it's not working as well. However it works If I switch from scp-action to ssh-action and leave everything the same, except changing source,target to script
encounter same issue.. I was able to do same config at ssh-action.. but no luck on scp-action..
my ssh key format is using the ed25519..
content :
-----BEGIN OPENSSH PRIVATE KEY-----
xxxx
-----END OPENSSH PRIVATE KEY-----
not sure is it not support for ed25519 but ssh-action does support ed25519?
UPDATE:
tried PEM format id_rsa.. still encounter same issue..
with error:
error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
@appleboy any updates here ? It's been quite a while since this doesn't work
same bug, @appleboy any update?
@und3fined @ocervell @zigang93 @dreddko I bump new version https://github.com/appleboy/scp-action/releases/tag/v0.1.2 please try it out.
Yeah! It's worked!