{"id":606,"date":"2018-08-09T18:53:00","date_gmt":"2018-08-09T18:53:00","guid":{"rendered":"http:\/\/lash.utrng.edu.mx\/?p=606"},"modified":"2018-08-09T18:53:00","modified_gmt":"2018-08-09T18:53:00","slug":"actividades-en-ssh","status":"publish","type":"post","link":"https:\/\/lash.utrng.edu.mx\/?p=606","title":{"rendered":"Actividades en SSH"},"content":{"rendered":"<p><a href=\"http:\/\/lash.utrng.edu.mx\/wp-content\/uploads\/2018\/08\/network-2081171_640.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-607\" src=\"http:\/\/lash.utrng.edu.mx\/wp-content\/uploads\/2018\/08\/network-2081171_640.jpg\" alt=\"\" width=\"640\" height=\"360\" srcset=\"https:\/\/lash.utrng.edu.mx\/wp-content\/uploads\/2018\/08\/network-2081171_640.jpg 640w, https:\/\/lash.utrng.edu.mx\/wp-content\/uploads\/2018\/08\/network-2081171_640-300x169.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Para realizar esta pr\u00e1ctica, es necesario recorrer los siguientes pasos:<\/p>\n<h3><span style=\"color: #0000ff;\"><strong>En el equipo que ser\u00e1 Servidor:<\/strong><\/span><\/h3>\n<p>si es una distribuci\u00f3n <span style=\"color: #ff6600;\">basada en Debian<\/span>, podemos usar el comando <strong><span style=\"color: #ff0000;\">aptitude<\/span><\/strong> de la siguiente forma:<\/p>\n<p><em>-podemos usar el comando <span style=\"color: #ff0000;\">sudo<\/span> o cambiar directamente a <span style=\"color: #ff0000;\">root&nbsp;<span style=\"color: #000000;\">para poder instalar el servidor-<\/span><\/span><\/em><\/p>\n<p><span style=\"color: #3366ff;\">root@pc-Server#<\/span><span style=\"color: #008000;\">aptitude search ssh&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&lt;&lt;&#8211;buscamos el paquete que contenga el servidor<\/span><\/span><\/p>\n<p><span style=\"color: #3366ff;\">root@pc-Server#<\/span><span style=\"color: #008000;\">aptitude install openssh-server<\/span><\/p>\n<p>Por esta ocasi\u00f3n, no vamos a configurar nada extra del servidos, como el puerto o alguna restricci\u00f3n en especial, aunque generalmente arranca el demonio(\u00abservicio\u00bb para los novatos windowseros) de ssh autom\u00e1ticamente, vamos a ejecutar una instrucci\u00f3n extra para tal fin:<\/p>\n<p><!--more--><\/p>\n<p><span style=\"color: #3366ff;\">root@pc-Server#&nbsp;<span style=\"color: #008000;\">\/etc\/init.d\/ssh start<\/span><\/span><\/p>\n<p>podemos crear un usuario para que los clientes se conecten a este servidor, una forma de hacerlo ser\u00eda la siguiente:<\/p>\n<p><span style=\"color: #3366ff;\">root@pc-Server#&nbsp;<span style=\"color: #008000;\">adduser juan<\/span><\/span><\/p>\n<p>El shell nos pedir\u00e1 agregar alguna informaci\u00f3n extra, <span style=\"color: #ff0000;\">Password<\/span>, Nombre, etc, con excepci\u00f3n del Password que es necesario, el resto de la informaci\u00f3n es opcional(<span style=\"color: #ff0000;\"><span style=\"color: #ff0000;\"><b>recuerden que cuando tipean el password, no se ver\u00e1 ning\u00fan&nbsp;caracter escrito, no se espanten<\/b><\/span><\/span>). Una vez hecho esto, podemos compartir esta informaci\u00f3n con los clientes, as\u00ed como nuestra IP.<\/p>\n<h3><span style=\"color: #0000ff;\"><strong>En los equipos que ser\u00e1n clientes(los que se van a conectar)<\/strong><\/span><\/h3>\n<p>En este punto, es necesario conocer algunos aspectos para poder hacer el acceso remoto:<\/p>\n<ul>\n<li>Las compus deben estar en el mismo rango de red o poder hacer un ping con \u00e9xito hacia el servidor.<\/li>\n<li>Si no se logra el ping, cambiar la IP de la<span style=\"color: #800080;\"> pc cliente<\/span> a una del rango del servidor, ejemplo:\n<ul>\n<li><strong>IP servidor-ssh:<\/strong><span style=\"color: #008000;\">10.10.10.5<\/span>&nbsp; <span style=\"color: #ff6600;\">255.255.255.0<\/span><\/li>\n<li><strong>IP cliente 1:<\/strong><span style=\"color: #008000;\">10.10.10.30<\/span> <span style=\"color: #ff6600;\">255.255.255.0<\/span><\/li>\n<li><strong>IP cliente 2:<\/strong> <span style=\"color: #008000;\">10.10.10.31<\/span> <span style=\"color: #ff6600;\">255.255.255.0<\/span><\/li>\n<li><strong>IP cliente 3:<\/strong> <span style=\"color: #008000;\">10.10.10.32<\/span>&nbsp;<span style=\"color: #ff6600;\">255.255.255.0<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Hay que conocer los datos de un usuario activo en el servidor, es decir, conocer el <span style=\"color: #800080;\">nombre del usuario y contrase\u00f1a<\/span> para poder enlazarnos, ejemplo:\n<ul>\n<li><span style=\"color: #008000;\">Usuario:<\/span><span style=\"color: #ff6600;\">juan<\/span><\/li>\n<li><span style=\"color: #008000;\">password:<\/span><span style=\"color: #ff6600;\">j<\/span><\/li>\n<\/ul>\n<\/li>\n<li>es momento de probar y conectar:\n<ul>\n<li><span style=\"color: #3366ff;\"><span style=\"color: #000080;\">pedrito@pc-HP$<\/span>&nbsp;<span style=\"color: #800000;\">ping&nbsp;10.10.10.5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span style=\"color: #000000;\">&lt;&lt;&#8211;Si hay exito en la comunicaci\u00f3n continuar, sino reconfigurar<\/span><\/span><\/span><\/li>\n<li><span style=\"color: #3366ff;\"><span style=\"color: #000080;\">pedrito@pc-HP$<\/span>&nbsp;<span style=\"color: #800000;\">ssh juan@10.10.10.5&nbsp; &nbsp;<span style=\"color: #000000;\">&lt;&lt;&#8211; nos mostrar\u00e1 una advertencia de que accederemos remotamente(escribir \u00abyes\u00bb)<\/span><\/span><\/span><\/li>\n<li>password:_&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&#8211;ingresar el password del usuario \u00abjuan\u00bb<\/li>\n<li><span style=\"color: #3366ff;\">juan@10.10.10.5$ _&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&lt;&lt;&#8211; ya estamos en el servidor<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span style=\"color: #0000ff;\">Una vez conectados al servidor SSH<\/span><\/h3>\n<p>Realizar las siguientes acciones:<\/p>\n<ol>\n<li>Crear una carpeta con <span style=\"color: #666699;\">su nombre<\/span>(el nombre de quien se ha conectado) y entrar en ella.<\/li>\n<li>Crear el archivo <strong><span style=\"color: #993300;\">datos.txt<\/span><\/strong><\/li>\n<li>Mandar la salida de los siguientes comando por tuber\u00eda hacia el archivo <strong><span style=\"color: #993300;\">datos.txt<\/span><\/strong>:\n<ol>\n<li>date<\/li>\n<li>whoami<\/li>\n<li>uname -a<\/li>\n<li>lspci (tal vez requiera ejecutarse con sudo)<\/li>\n<li>cat&nbsp;\/etc\/issue<\/li>\n<\/ol>\n<\/li>\n<li>Guardar la carpeta creada(la que lleva su nombre) y anexarla al resto de los trabajos a entregar\/enviar al correo.<\/li>\n<\/ol>\n<p>es todo!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Para realizar esta pr\u00e1ctica, es necesario recorrer los siguientes pasos: En el equipo que ser\u00e1 Servidor: si es una distribuci\u00f3n basada en Debian, podemos usar el comando aptitude de la siguiente forma: -podemos usar el comando sudo o cambiar directamente a root&nbsp;para poder instalar el servidor- root@pc-Server#aptitude search ssh&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &hellip; <a href=\"https:\/\/lash.utrng.edu.mx\/?p=606\">Seguir leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-606","post","type-post","status-publish","format-standard","hentry","category-tercerparcialso"],"_links":{"self":[{"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=\/wp\/v2\/posts\/606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=606"}],"version-history":[{"count":1,"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=\/wp\/v2\/posts\/606\/revisions"}],"predecessor-version":[{"id":608,"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=\/wp\/v2\/posts\/606\/revisions\/608"}],"wp:attachment":[{"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lash.utrng.edu.mx\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}