sftp with key authentication on linux image

Christoffer's Avatar

Christoffer

18 Apr, 2019 10:13 AM

Hi,

I have read the previous threads stating that you do not support ssh key authentication for sftp since it is using a .NET implementation. However, on the Linux images it should be possible to use this. I have noticed that you use lftp, which seem to have a workaround by not passing the password at all.

https://www.systutorials.com/241605/how-to-make-lftp-to-use-key-for-authentication-for-sftp-on-linux/

  1. 1 Posted by Christoffer on 18 Apr, 2019 11:41 AM

    Christoffer's Avatar

    I currently have this solved by running the following:

      deploy_script:
        - lftp -e 'set sftp:connect-program "ssh -a -x -i sshkey";set cmd:trace yes;set cmd:verbose yes;mkdir -f /home/user/deploy;put -O /home/user/deploy /home/appveyor/projects/project.jar;put -O /home/ec2-user/deploy /home/appveyor/projects/project.yml;bye' -u user,xxx sftp://host
    

    This means risking breaking changes by not using the default deploy provider though.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac