Re: [EXTERNAL] - Error using scp to transfer files to CentOS

2017-04-18 Thread Thiago Carvalho Davila
That worked! Thanks a lot.

Best regards.

Thiago

Em 18/04/2017 09:53:32, Dirk Heinrichs escreveu:
> 
  
  
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 > > 
> > root@10.139.5.166:/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 > root@10.139.5.166
> 
> 
HTH...
> 
> 
    Dirk
> 
-- 
> Dirk Heinrichs
> 
  Senior Systems Engineer, Delivery Pipeline
> 
  OpenText> TM>  Discovery | Recommind
> Email> : > dirk.heinri...@recommind.com
> Website> : > 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 > jenkinsci-users+unsubscr...@googlegroups.com> .
> 
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> .



-


"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa 
pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada 
exclusivamente a seu destinatário e pode conter informações confidenciais, 
protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e 
sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, 
por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."

"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a 
government company established under Brazilian law (5.615/70) -- is directed 
exclusively to its addressee and may contain confidential data, protected under 
professional secrecy rules. Its unauthorized use is illegal and may subject the 
transgressor to the law's penalties. If you're not the addressee, please send 
it back, elucidating the failure."

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4e5daed6d7edee659e202c7ae05d03281d4769af%40serpro.gov.br.
For more options, visit https://groups.google.com/d/optout.


Re: [EXTERNAL] - Error using scp to transfer files to CentOS

2017-04-18 Thread Dirk Heinrichs
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 
> root@10.139.5.166:/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 root@10.139.5.166

HTH...

Dirk
-- 
*Dirk Heinrichs*
Senior Systems Engineer, Delivery Pipeline
OpenText^TM Discovery | Recommind
*Email*: dirk.heinri...@recommind.com 
*Website*: 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 jenkinsci-users+unsubscr...@googlegroups.com.
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.


Error using scp to transfer files to CentOS

2017-04-18 Thread Thiago Carvalho Davila
Hello,

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

Then I made a job to transfer files and I am getting the error:
+ scp /opt/programas/jenkins/tmp/file.jar 
root@10.139.5.166:/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
Any thoughts?

Best regards,

Thiago

-


"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa 
pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada 
exclusivamente a seu destinatário e pode conter informações confidenciais, 
protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e 
sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, 
por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."

"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a 
government company established under Brazilian law (5.615/70) -- is directed 
exclusively to its addressee and may contain confidential data, protected under 
professional secrecy rules. Its unauthorized use is illegal and may subject the 
transgressor to the law's penalties. If you're not the addressee, please send 
it back, elucidating the failure."

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5f402dcf32e2f9ed385a939293b55a2b2b0b16c6%40serpro.gov.br.
For more options, visit https://groups.google.com/d/optout.