{"id":1503,"date":"2017-01-07T00:17:00","date_gmt":"2017-01-07T06:17:00","guid":{"rendered":"http:\/\/linuxitos.com\/main\/habilitar-open-ssh-en-ubuntu-en-una-red-local\/"},"modified":"2017-01-07T00:17:00","modified_gmt":"2017-01-07T06:17:00","slug":"habilitar-open-ssh-en-ubuntu-en-una-red-local","status":"publish","type":"post","link":"https:\/\/linuxitos.com\/main\/habilitar-open-ssh-en-ubuntu-en-una-red-local\/","title":{"rendered":"Habilitar open ssh en Ubuntu en una red local"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/4.bp.blogspot.com\/-3GIJEqyTgOE\/WHBsW6wWJ0I\/AAAAAAAAEQI\/kwhc9a9RQHM3FB46Bau2x-yPwq3qbjtcQCLcB\/s1600\/descarga.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"466\" src=\"https:\/\/4.bp.blogspot.com\/-3GIJEqyTgOE\/WHBsW6wWJ0I\/AAAAAAAAEQI\/kwhc9a9RQHM3FB46Bau2x-yPwq3qbjtcQCLcB\/s640\/descarga.png\" width=\"640\" \/><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">En algunas ocasiones es necesario acceder a los archivos de otra PC de manera local de dos distros Linux diferentes, ya sea mediante la terminal o usando una interfaz gr\u00e1fica.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Secure Shell (SSH) o m\u00e1s recientemente OpenSSH, permiten esta funcionalidad sin hacer muchas configuraciones. En lo personal me gusta configurarla para utilizarla con Nautilus:<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/4.bp.blogspot.com\/-66wPs-y1a64\/WHB2ElaJm3I\/AAAAAAAAEQY\/Qp5mteh7yMgS8-KaWt5UaIZfU8TRovo_QCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2017-01-06%2B22-59-30.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/4.bp.blogspot.com\/-66wPs-y1a64\/WHB2ElaJm3I\/AAAAAAAAEQY\/Qp5mteh7yMgS8-KaWt5UaIZfU8TRovo_QCLcB\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2017-01-06%2B22-59-30.png\" \/><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">De esta manera, es simple y muy f\u00e1cil acceder a los archivos de manera remota en la misma red. Por ejemplo, al administrar un servidor, los cuales usualmente no se les instala una interfaz gr\u00e1fica, como debian, centos o redhat, entonces resulta \u00fatil administrarlo desde otro punto de la misma red local. Sin necesidad de desplazarse hasta el cuarto de red del servidor.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<p><span style=\"font-size: large;\">En servidores debian se realiza de la siguiente manera:<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">1.- Instalar OpenSSH<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo apt-get install openssh-server<\/pre>\n<p><span style=\"font-size: large;\">2.- Respaldar archivos originales: por seguridad y como una buena pr\u00e1ctica es necesario respaldar la configuraci\u00f3n por defecto, por si llegara a pasar algo fuera de lo normal.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo cp \/etc\/ssh\/sshd_config \/etc\/ssh\/sshd_config.factory-defaults<br \/><br \/>sudo chmod a-w \/etc\/ssh\/sshd_config.factory-defaults<\/pre>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">3.- Editar sshd_config: este archivo se configura para fungir como servidor de ssh. Por lo tanto, se editan los usuarios y contrase\u00f1as, \u00fanicamente a los que se les permitir\u00e1 conectarse a ssh.<\/span><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Abrir sshd_config con su el editor de su preferencia:<\/span><\/p>\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo gedit \/etc\/ssh\/sshd_config<\/pre>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">4.- A\u00f1adir al final del archivo el nombre del usuario a permitir la conexi\u00f3n:<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">quedando de la siguiente manera:<\/span><br \/><span style=\"background-color: white; border: 0px; color: #262626; font-family: &quot;carrois gothic&quot; , sans-serif; font-size: medium; font-style: normal; font-weight: normal; letter-spacing: normal; margin: 0px; outline: 0px; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; word-spacing: 0px;\"><\/span><\/p>\n<pre style=\"background: url(&quot;assets\/shadow.png&quot;) 50% 100% repeat-x rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 0px 0px 3px; box-sizing: border-box; font-stretch: normal; line-height: 1.6; margin: 0px 0px 10px; max-width: 100%; orphans: 2; outline: 0px; overflow: auto; padding: 9.5px; tab-size: 4; text-align: left; text-indent: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; widows: 2; word-break: break-all; word-wrap: break-word;\"><span style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"border: 0px; line-height: 18.5714px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"color: #333333; font-family: inherit;\"><span style=\"font-size: 15px; font-style: inherit; font-weight: inherit; white-space: pre-wrap;\"># usuarios permitidos<br \/>AllowUsers linuxitos admin<br \/><br \/># usuarios no permitidos<br \/><\/span><\/span><span style=\"color: #333333; font-family: &quot;menlo&quot; , &quot;monaco&quot; , &quot;consolas&quot; , &quot;courier new&quot; , monospace;\"><span style=\"font-size: 15px; white-space: pre-wrap;\">DenyUsers root viky<\/span><\/span><span style=\"color: #333333; font-family: inherit;\"><span style=\"font-size: 15px; font-style: inherit; font-weight: inherit; white-space: pre-wrap;\"><br \/><\/span><\/span><\/span><\/span><\/pre>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">5.- Iniciar o reiniciar servicio de ssh<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\"><\/span><\/p>\n<pre style=\"background: rgb(54, 63, 72); border-radius: 6px; border: 0px; box-sizing: border-box; color: white; font-family: menlo, monaco, monospace; font-style: inherit; font-weight: inherit; line-height: 15.68px; margin-bottom: 1.1em; max-width: 100%; outline: 0px; overflow: auto; padding: 13.125px 16.4062px; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;\">sudo start ssh<br \/><br \/>sudo restart ssh<\/pre>\n<div><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Incluso se pueden asignar horarios de inicio de sesi\u00f3n, etc.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Como, ya mencion\u00e9, esta es una configuraci\u00f3n b\u00e1sica y r\u00e1pida para ser utilizado dentro de una red local. Si se desea configurar para salida a internet, entonces es necesario utilizar dns, o salida mediante una IP p\u00fablica.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">M\u00e1s informaci\u00f3n:<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: right;\"><a href=\"https:\/\/help.ubuntu.com\/community\/SSH\/OpenSSH\/Configuring\">https:\/\/help.ubuntu.com\/community\/SSH\/OpenSSH\/Configuring<\/a><\/div>\n<div style=\"text-align: right;\"><a href=\"http:\/\/pressroom.hostalia.com\/wp-content\/themes\/hostalia_pressroom\/images\/WP-Hostalia-protocolo-SSH.pdf\">http:\/\/pressroom.hostalia.com\/wp-content\/themes\/hostalia_pressroom\/images\/WP-Hostalia-protocolo-SSH.pdf<\/a><\/div>\n<div style=\"text-align: right;\"><a href=\"http:\/\/web.mit.edu\/rhel-doc\/4\/RH-DOCS\/rhel-rg-es-4\/ch-ssh.html\">http:\/\/web.mit.edu\/rhel-doc\/4\/RH-DOCS\/rhel-rg-es-4\/ch-ssh.html<\/a><\/div>\n<div style=\"text-align: right;\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>En algunas ocasiones es necesario acceder a los archivos de otra PC de manera local de dos distros Linux diferentes, ya sea mediante la terminal o usando una interfaz gr\u00e1fica. Secure Shell (SSH) o m\u00e1s recientemente OpenSSH, permiten esta funcionalidad sin hacer muchas configuraciones. En lo personal me gusta configurarla para utilizarla con Nautilus: De [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[248,250,7,249,244,181],"tags":[],"class_list":["post-1503","post","type-post","status-publish","format-standard","hentry","category-acceso","category-compartir","category-fedora","category-ftp","category-ssh","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/comments?post=1503"}],"version-history":[{"count":0,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1503\/revisions"}],"wp:attachment":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media?parent=1503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/categories?post=1503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/tags?post=1503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}