Am 18.04.2017 um 14:38 schrieb Thiago Carvalho Davila:
> I'm having trouble to transfer files via scp to my CentOS servers. I
> generated RSA keys on destination servers:
>
> ssh-keygen -t rsa
>
> And added to known_hosts in my jenkins slave:
>
> ssh-keyscan -t rsa ${HOST_IP} >> ~/.ssh/known_hosts
>
So now the slave knows your destination server, that's good.
> Then I made a job to transfer files and I am getting the error:
> + scp /opt/programas/jenkins/tmp/file.jar
> [email protected]:/opt/websites/jboss/6.3-eap/file.jar
> Permission denied, please try again.
> Permission denied, please try again.
> Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
> lost connection
But obviously, the root user at the destination server doesn't know your
jenkins user. You need to provide a user keyfile so that the user can
authenticate to the server. You can do that with the same command as
above, but on your slave and as the user running the slave process, then
copy the key over:
ssh-copy-id [email protected]
HTH...
Dirk
--
*Dirk Heinrichs*
Senior Systems Engineer, Delivery Pipeline
OpenText^TM Discovery | Recommind
*Email*: [email protected] <mailto:[email protected]>
*Website*: www.recommind.de <http://www.recommind.de>
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer
HRB 10646
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/d6f9dc43-a5e3-8799-0fbc-014581d3c742%40opentext.com.
For more options, visit https://groups.google.com/d/optout.