{"id":919,"date":"2022-03-30T14:35:26","date_gmt":"2022-03-30T20:35:26","guid":{"rendered":"https:\/\/techexperiencemx.com\/?p=919"},"modified":"2022-04-07T19:14:37","modified_gmt":"2022-04-08T00:14:37","slug":"generar-ssh-keys-synology","status":"publish","type":"post","link":"https:\/\/techexperiencemx.com\/?p=919","title":{"rendered":"Generar SSH Keys Synology"},"content":{"rendered":"\n<p>Hola amigos hoy vamos a ver c\u00f3mo podemos generar llaves ssh, pero que son \u00abssh key\u00bb?? Las claves o llaves&nbsp;SSH&nbsp;nos sirven para acceder a nuestros&nbsp;&nbsp;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ed2f2f\" class=\"has-inline-color\">Servidores en casa-oficina,&nbsp;Cloud&nbsp;o&nbsp;VPS<\/mark><\/strong>&nbsp;de forma segura y&nbsp; mediante la l\u00ednea de comandos. De este modo,&nbsp;podemos trabajar con las m\u00e1quinas remotas y realizar todo tipo de acciones como si estuvi\u00e9ramos delante de ellas, vamos a ver como poder realizar el proceso en mi caso lo genere desde my Nas de prueba<\/p>\n\n\n\n<p>Iniciamos sesi\u00f3n en nuestro Nas por ssh <\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">ssh usuario@ip -p<\/mark>  (si es 22 eliminamos -p)<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">ssh carlos@192.168.0.68<\/mark><\/p>\n\n\n\n<h3 class=\"has-text-align-right has-small-font-size wp-block-heading\">Generar SSH Keys Synology<\/h3>\n\n\n\n<p class=\"has-text-align-right\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/1-34.png\" alt=\"Generar SSH Keys Synology\" class=\"wp-image-920\" width=\"811\" height=\"532\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/1-34.png 572w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/1-34-300x197.png 300w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Vamos Generar carpeta .ssh :<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f94444\" class=\"has-inline-color\">m<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fa0606\" class=\"has-inline-color\">kdir .ssh<\/mark><\/strong><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Vamos Generar \u00abauthorized_keys\u00bb<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e60e0e\" class=\"has-inline-color\"><strong>touch .ssh\/authorized_keys<\/strong><\/mark><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">A<strong>hora nos movemos a la capeta .ssh<\/strong><\/mark><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e01414\" class=\"has-inline-color\"><strong>cd .ssh<\/strong><\/mark><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Vamos generar las llaves<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ec1b1b\" class=\"has-inline-color\">ssh-keygen -t rsa -b 4096<\/mark><\/strong>\n\n\n\n\n\nNOTA: \n\n\nEnter file in with to save : aqui elige la ruta donde se guardar\u00e1 nuestras llaves\n\n\nEnter passphrase : aqu\u00ed podemos agregarle una frase a nuestras llaves, te pedir\u00e1 esta frase cada que iniciemos sesi\u00f3n si la seleccionamos\n\n<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/2-13.png\" alt=\"\" class=\"wp-image-921\" width=\"900\" height=\"586\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/2-13.png 568w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/2-13-300x195.png 300w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Bien nos vamos a dirigir a un archivo dentro de nuestro Nas para poder modificar algunas lineas en concreto 2 solo eliminamos el s\u00edmbolo # de las siguientes<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\">--------<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#eb2525\" class=\"has-inline-color\">vim \/etc\/ssh\/sshd_config<\/mark><\/strong>\n\n\n\n\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e51a1a\" class=\"has-inline-color\">#PubkeyAuthentication yes\n\n\n\n#AuthorizedKeysFile .ssh\/authorized_keys\n<\/mark><\/strong>\n\n<strong>\nguardamos<\/strong><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/3-10.png\" alt=\"\" class=\"wp-image-925\" width=\"906\" height=\"596\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/3-10.png 572w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/3-10-300x197.png 300w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Ahora solo queda copiar la clave dentro del archivo de llave publica creada anteriormente <\/mark><\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">puedes utilizar el comando <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e717b3\" class=\"has-inline-color\">cat<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\"> para ver dentro del archivo <\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ef2525\" class=\"has-inline-color\">cat \/volume1\/homes\/Carlos\/.ssh\/test.pub<\/mark><\/strong><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/Captura-de-Pantalla-2022-03-30-a-las-13.51.23.png\" alt=\"\" class=\"wp-image-922\" width=\"895\" height=\"585\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/Captura-de-Pantalla-2022-03-30-a-las-13.51.23.png 569w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/Captura-de-Pantalla-2022-03-30-a-las-13.51.23-300x196.png 300w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Ya copiada la llave publica nos dirigimos a la ruta, pegamos y  guardamos<\/mark><\/strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\"><strong> <\/strong><\/mark><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f47807\" class=\"has-inline-color\">\u00ab:wq\u00bb<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#eb2525\" class=\"has-inline-color\">vim .ssh\/authorized_keys <\/mark><\/strong><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"565\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/4-11.png\" alt=\"\" class=\"wp-image-924\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/4-11.png 1016w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/4-11-300x167.png 300w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/4-11-768x427.png 768w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/Captura-de-Pantalla-2022-03-30-a-las-14.17.35.png\" alt=\"\" class=\"wp-image-928\" width=\"894\" height=\"586\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/Captura-de-Pantalla-2022-03-30-a-las-14.17.35.png 561w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/Captura-de-Pantalla-2022-03-30-a-las-14.17.35-300x197.png 300w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/figure>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Bien solo falta llevarnos la llave privada a nuestro cliente si la llave privada esta oculta y no la ves por ning\u00fan lado solo copiala a un folder ejemplo \u00abdescargas\u00bb de nuestro Nas para poder verla <\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f11d1d\" class=\"has-inline-color\"><strong>cp \/volume1\/homes\/Carlos\/test \/volume1\/descargas<\/strong><\/mark><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f12929\" class=\"has-inline-color\">NOTA:\n\n\nsi genera algun error al momento de querer entrar con llave ssh posiblemente sea error de permisos de archivo yo tengo configurado de la siguiente forma\n\nchmod 700 .ssh\n\nchmod 644 authorized:keys\n\nchmod 600 test (esta es mi llave privada)<\/mark><\/strong><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Ahora solo copiamos nuestra llave ssh en alg\u00fan cliente ejemplo Mac: <\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f62828\" class=\"has-inline-color\"><strong>cp \/users\/usuario\/descargas \/users\/usuario\/.ssh<\/strong><\/mark><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\"><strong>Ahora solo basta con probar abrimos terminal de nuestro cliente<\/strong><\/mark><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\" style=\"font-size:18px\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e72828\" class=\"has-inline-color\">user@server]$ ssh -i ~\/.ssh\/nombre de tu llave USER@IP_ADDRESS<\/mark><\/strong>\n\n\n\n<strong>\nNOTA:\n\nte pedir\u00e1 clave \"passphrase\" si la ingresaste cuando generaste las llaves ponla de lo contrario no te pedir\u00e1 nada<\/strong><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.youtube.com\/channel\/UCNJtdVDt9bAjSx8CjNlZL9A\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/YouTube-LOGO.png-2-1024x576.webp\" alt=\"\" class=\"wp-image-914\" width=\"36\" height=\"19\" srcset=\"https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/YouTube-LOGO.png-2-1024x576.webp 1024w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/YouTube-LOGO.png-2-300x169.webp 300w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/YouTube-LOGO.png-2-768x432.webp 768w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/YouTube-LOGO.png-2-1536x864.webp 1536w, https:\/\/techexperiencemx.com\/wp-content\/uploads\/2022\/03\/YouTube-LOGO.png-2-2048x1152.webp 2048w\" sizes=\"auto, (max-width: 36px) 100vw, 36px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hola amigos hoy vamos a ver c\u00f3mo podemos generar llaves ssh, pero que son \u00abssh key\u00bb?? Las claves o llaves&nbsp;SSH&nbsp;nos sirven para acceder a nuestros&nbsp;&nbsp;Servidores en casa-oficina,&nbsp;Cloud&nbsp;o&nbsp;VPS&nbsp;de forma segura y&nbsp; mediante la l\u00ednea de comandos. De este modo,&nbsp;podemos trabajar con las m\u00e1quinas remotas y realizar todo tipo de acciones como si estuvi\u00e9ramos delante de ellas, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":931,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[],"class_list":["post-919","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-synology"],"_links":{"self":[{"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=\/wp\/v2\/posts\/919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=919"}],"version-history":[{"count":0,"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=\/wp\/v2\/posts\/919\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=\/wp\/v2\/media\/931"}],"wp:attachment":[{"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techexperiencemx.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}