Re: Pipeline: Transfer files via SSH

2017-06-23 Thread Ryan Kuharske
I know this is an old thread but I thought I'd post how I was able to get the issue resolved. The issue we were having is that the ID which Jenkins runs with doesn't have access to the directory we needed to publish our artifacts to. In order to get around this, we needed to ssh back into the

Re: Pipeline: Transfer files via SSH

2017-06-23 Thread Ryan Kuharske
I know this is a very old topic, however I thought I'd add to it in case the original author will still get updates and for anyone else running into issues who comes across this thread. For myself, the issue was not having the public key (that was generated on the server you're trying to

Re: Pipeline: Transfer files via SSH

2016-06-14 Thread Sverre Moe
Got the following debug output. Wonder if it could have something to do with: key_parse_private2: missing begin marker However, the private key file has header "-BEGIN RSA PRIVATE KEY-" and footer "-END RSA PRIVATE KEY-" debug2: key: private.key ((nil)), explicit debug1:

Re: Pipeline: Transfer files via SSH

2016-06-14 Thread Zoratto Thomas
Ok, then try to ssh manually with full verbose mode (-vvv) > Le 14 juin 2016 à 08:54, Sverre Moe a écrit : > > The private key is actually not password protected. I chose empty password > when I generated the private key on the server. > > tirsdag 14. juni 2016 08.41.17

Re: Pipeline: Transfer files via SSH

2016-06-14 Thread Sverre Moe
The private key is actually not password protected. I chose empty password when I generated the private key on the server. tirsdag 14. juni 2016 08.41.17 UTC+2 skrev Thomas Zoratto følgende: > > Your private keys seems to be protected by a passphrase. As you are not in > an interactive shell

Re: Pipeline: Transfer files via SSH

2016-06-14 Thread Zoratto Thomas
Your private keys seems to be protected by a passphrase. As you are not in an interactive shell there is no tty so it fails when trying to ask for passphrase. > Le 14 juin 2016 à 08:20, Sverre Moe a écrit : > > It looks like it is trying the private key credentials from

Re: Pipeline: Transfer files via SSH

2016-06-14 Thread Sverre Moe
It looks like it is trying the private key credentials from Jenkins, but fails. When it fails it tries the public key for the user, then finally trying password which it cannot get. debug1: Authentications that can continue: publickey,keyboard-interactive debug1: Next authentication method:

Re: Pipeline: Transfer files via SSH

2016-06-13 Thread Zoratto Thomas
Hi, Try to ssh in verbose mode and you'll know what's happening. ssh -v ... (The more v you put, the more verbose it will be) > Le 13 juin 2016 à 15:21, Sverre Moe a écrit : > > I have already added the host to ~/.ssh/known_hosts, so using > StrictHostKeyChecking=no

Re: Pipeline: Transfer files via SSH

2016-06-13 Thread Sverre Moe
I have already added the host to ~/.ssh/known_hosts, so using StrictHostKeyChecking=no is no longer necessary. What I am experiencing now is authentication problem. It does not use the credentials with the ssh connection. Thus I receive Permission denied (publickey,keyboard-interactive). My

Re: Pipeline: Transfer files via SSH

2016-06-13 Thread Baptiste Mathus
Indeed in my case I had disabled host key checking. What works for me is: sshagent(['some-id']) { sh """ ssh -o StrictHostKeyChecking=no marmotte@marmotte "docker create -v /var/jenkins_home --name ze-data jenkins:1.642.1 || echo 'data container already existing?' "

Re: Pipeline: Transfer files via SSH

2016-06-13 Thread Sverre Moe
Am i missing something in my script content? sshagent(['repository']) { sh 'ssh -Xf bu...@repo.company.com ls -l /home/build/ ' } When executing ssh within sshagent I am getting Permission denied (publickey,keyboard-interactive). The credential repository has the private key for the user

Re: Pipeline: Transfer files via SSH

2016-06-06 Thread Sverre Moe
I could perhaps circumvent this problem by adding the build users public key from each slave node to authorized_keys on the server. Then I would not need to use the credentials on Jenkins. However I see that only as a fallback option. Best approach would be to use authentication from Jenkins

Re: Pipeline: Transfer files via SSH

2016-06-06 Thread Sverre Moe
Using the following with ssh I can disable host key verification ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@server. company.com also scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no *.rpm r...@server.company.com:/tmp Warning: Permanently added

Re: Pipeline: Transfer files via SSH

2016-06-04 Thread Baptiste Mathus
Did you try passing the host key checking ssh parameter to "no"? Le 2 juin 2016 4:10 PM, "Sverre Moe" a écrit : > I need to transfer some files to a server. > Have followed the suggestion mention in > https://issues.jenkins-ci.org/browse/JENKINS-27963 > Tried sshagent with

Pipeline: Transfer files via SSH

2016-06-02 Thread Sverre Moe
I need to transfer some files to a server. Have followed the suggestion mention in https://issues.jenkins-ci.org/browse/JENKINS-27963 Tried sshagent with both scp and rsync. Neither works. I have created a Credential for this server in Jenkins. Using rsync sshagent(['repository']) { sh