Chave SSH

15 views
Skip to first unread message

Alessandro Carvalho

unread,
Jun 3, 2019, 6:51:05 AM6/3/19
to OpMon
bom dia, estou precisando criar uma chave publica para monitorar um serviço mas o opmon não tem a codificação SSH ed25519.

Como faço para instalar?

obrigado!

Ednilson Correa

unread,
Jun 3, 2019, 9:48:42 AM6/3/19
to op...@googlegroups.com
Alessandro, bom dia!

O suporte a codificação ED25519 iniciou no OpenSSH 6.5 e o pacote do OpenSSH mais atual para o CentOS 6 é o 5.3.

Segue um tutorial de como compilar uma versão mais recente (com suporte ao ED25519) no CentOS 6.

[ ]'s
Ednilson

--
You received this message because you are subscribed to the Google Groups "OpMon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opmon+un...@googlegroups.com.
To post to this group, send email to op...@googlegroups.com.
Visit this group at https://groups.google.com/group/opmon.
To view this discussion on the web visit https://groups.google.com/d/msgid/opmon/8d31ee7f-8aed-4537-96a4-9fb7a757f4be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Cordialmente,
Ednilson Correa
Suporte ao Sucesso do Cliente
(51) 3275.3588

Alessandro Carvalho

unread,
Jun 3, 2019, 10:04:33 AM6/3/19
to op...@googlegroups.com
legal, obrigado!

Att,

Alessandro Carvalho
97684-1142


Alessandro Carvalho

unread,
Jun 3, 2019, 12:11:45 PM6/3/19
to OpMon
Uma dúvida, o usuário que executa os comandos no opmon é o opuser? 

precisa saber para criar a chave para ele



Em segunda-feira, 3 de junho de 2019 10:48:42 UTC-3, Ednilson Correa escreveu:
Alessandro, bom dia!

O suporte a codificação ED25519 iniciou no OpenSSH 6.5 e o pacote do OpenSSH mais atual para o CentOS 6 é o 5.3.

Segue um tutorial de como compilar uma versão mais recente (com suporte ao ED25519) no CentOS 6.

[ ]'s
Ednilson

Em seg, 3 de jun de 2019 às 07:51, Alessandro Carvalho <cap...@gmail.com> escreveu:
bom dia, estou precisando criar uma chave publica para monitorar um serviço mas o opmon não tem a codificação SSH ed25519.

Como faço para instalar?

obrigado!

--
You received this message because you are subscribed to the Google Groups "OpMon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to op...@googlegroups.com.

To post to this group, send email to op...@googlegroups.com.
Visit this group at https://groups.google.com/group/opmon.
To view this discussion on the web visit https://groups.google.com/d/msgid/opmon/8d31ee7f-8aed-4537-96a4-9fb7a757f4be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ednilson Correa

unread,
Jun 3, 2019, 4:04:06 PM6/3/19
to op...@googlegroups.com
Pode gerar para os usuários 'opuser' e 'apache'..

[ ]'s
Ednilson

To unsubscribe from this group and stop receiving emails from it, send an email to opmon+un...@googlegroups.com.

To post to this group, send email to op...@googlegroups.com.
Visit this group at https://groups.google.com/group/opmon.

For more options, visit https://groups.google.com/d/optout.

Alessandro Carvalho

unread,
Jun 3, 2019, 4:08:01 PM6/3/19
to op...@googlegroups.com
qual seria o processo pra criar para o apache?

com o opuser eu loguei com root e deu um su - opuser e fiz o processo desse procedimento

mas para o apache retorna This account is currently not available.



Att,

Alessandro Carvalho
97684-1142


Ednilson Correa

unread,
Jun 3, 2019, 5:08:19 PM6/3/19
to op...@googlegroups.com
entre como root e faça um
sudo -u apache ssh-keygen -t rsa

[ ]'s
Ednilson


For more options, visit https://groups.google.com/d/optout.

Alessandro Carvalho

unread,
Jun 4, 2019, 8:49:57 AM6/4/19
to OpMon
bom dia,, 

Fiz o comando como orientado

[root@opmon www]# sudo -u apache ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/var/www/.ssh/id_rsa):
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/www/.ssh/id_rsa.
Your public key has been saved in /var/www/.ssh/id_rsa.pub.
The key fingerprint is:
27:2e:03:78:d3:d2:3b:2d:fe:66:f7:17:80:7f:57:d7 apache@opmon
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|           .    .|
|   . o    . .   E|
|  . = o S .. .  o|
|   . + + o  . o .|
|      * o    . o |
|     . =o .   .  |
|      .+.. ...   |
+-----------------+

a chave foi criada

[root@opmon www]# cat /var/www/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsNUKxATT8lNKT1vv4KUQtgS1ZOm4aHY6bLplvyEKI5VXtoIhg8G/iJ0kAIowvSXtj1NrUAaOMok58H83gy5FynRFck8SeW5Ri7cPREDCB5kZgwUXYcDPlUBUqGMroBbNRENkX+QWrJTLBM7GkHvtqTTBg8VqRICMNfakjw2zEtwWIcvA+ueJjPj+KRqTgF7SZnih2QpMUY930BSECUQfM7TogcQ/abScsmEkEUPh9JbYTPlpBuR7YHVEKpFbTTnsem0L/mR0NsH2uYWgpklWs/H5DgrMpxHkM1p/Oqyw9rTibWjld1Skj/bJ/0Pd4Xk0WIUScSKF6ZuIwAkVidOhJw== apache@opmon

copiar a chave para o host remoto

#sudo -H -u apache bash -c 'ssh-copy-id 192.168.0.254'

[root@opmon www]# sudo -H -u apache bash -c 'ssh-copy-id 192.168.0.254'

mas esta pedindo senha


--
Cordialmente,
Ednilson Correa
Suporte ao Sucesso do Cliente
(51) 3275.3588

--
You received this message because you are subscribed to the Google Groups "OpMon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to op...@googlegroups.com.
To post to this group, send email to op...@googlegroups.com.
Visit this group at https://groups.google.com/group/opmon.

--
You received this message because you are subscribed to the Google Groups "OpMon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to op...@googlegroups.com.
To post to this group, send email to op...@googlegroups.com.
Visit this group at https://groups.google.com/group/opmon.

Alessandro Carvalho

unread,
Jun 4, 2019, 1:46:06 PM6/4/19
to OpMon
consegui resolver o problema, criei o usuário no servidor remoto e com a senha dele consegui copiar a chave publica

obrigado pela atenção!

Ednilson Correa

unread,
Jun 4, 2019, 3:59:43 PM6/4/19
to op...@googlegroups.com
Certo! de fato a senha que ele pedia era do user lá no servidor destino!

[ ]'s
Ednilson


To unsubscribe from this group and stop receiving emails from it, send an email to opmon+un...@googlegroups.com.

To post to this group, send email to op...@googlegroups.com.
Visit this group at https://groups.google.com/group/opmon.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages