{"id":6994,"date":"2018-06-13T10:52:35","date_gmt":"2018-06-13T08:52:35","guid":{"rendered":"https:\/\/blog.unelink.es\/?p=6994"},"modified":"2019-11-22T11:40:50","modified_gmt":"2019-11-22T10:40:50","slug":"conectarse-por-sftp-a-un-servidor-desde-ssh","status":"publish","type":"post","link":"https:\/\/hosting.airetech.es\/blog\/wiki\/conectarse-por-sftp-a-un-servidor-desde-ssh\/","title":{"rendered":"Conectarse por SFTP a un servidor desde SSH"},"content":{"rendered":"<p>El primer paso para poder <strong>realizar una conexi\u00f3n por SFTP<\/strong> a un <a href=\"https:\/\/www.unelink.es\/servidores-dedicados-32.html\" target=\"_blank\" rel=\"noopener noreferrer\">servidor dedicado<\/a>, o <a href=\"https:\/\/www.unelink.es\/servidores-virtuales-33.html\" target=\"_blank\" rel=\"noopener noreferrer\">VPS<\/a>, es <strong>tener instalado un cliente SFTP<\/strong>.<\/p>\n<p>Lo m\u00e1s probable es que tu sistema Linux ya tenga uno instalado por defecto, en caso contrario, tienes que instalarlo previamente. Para verificar que tienes un cliente SFTP instalado tan solo tienes que introducir el comando \"sftp\" en el terminal y deber\u00edas obtener una salida similar a esta:<\/p>\n<pre>[root@test ~]# sftp\r\nusage: sftp [-1246aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\r\n[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]\r\n[-o ssh_option] [-P port] [-R num_requests] [-S program]\r\n[-s subsystem | sftp_server] host\r\nsftp [user@]host[:file ...]\r\nsftp [user@]host[:dir[\/]]\r\nsftp -b batchfile [user@]host<\/pre>\n<div id=\"attachment_6995\" style=\"width: 661px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/test-sftp.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-6995\" class=\" wp-image-6995\" src=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/test-sftp.jpg\" alt=\"Test SFTP\" width=\"651\" height=\"201\" srcset=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/test-sftp.jpg 665w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/test-sftp-300x92.jpg 300w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/test-sftp-600x185.jpg 600w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><p id=\"caption-attachment-6995\" class=\"wp-caption-text\">Test SFTP<\/p><\/div>\n<p>En caso de no tenerlo instalado, lo que tienes que hacer es <strong>instalar el paquete \"openssh\"<\/strong>. En distribuciones Debian o Ubuntu lo puedes instalar a trav\u00e9s de apt y en CentOS puedes usar yum.<\/p>\n<p>Este ser\u00eda el comando para la <strong>instalaci\u00f3n en Debian\/Ubuntu<\/strong>:<\/p>\n<pre>apt-get install openssh<\/pre>\n<p>Y para <strong>instalarlo en CentOS<\/strong>:<\/p>\n<pre>yum install openssh<\/pre>\n<p>Una vez tengas SFTP instalado, el <strong>comando para conectarse por SFTP<\/strong> a un servidor es muy similar al usado para conectarse por SSH:<\/p>\n<pre>sftp usuario@servidor.tld<\/pre>\n<p>Donde \"usuario\" es el usuario al que quieres acceder. Si este nombre es \"root\", lo puedes omitir. En \"servidor.tld\" indica la IP o hostname del servidor. Por ejemplo:<\/p>\n<pre>sftp usuario@11.111.111.11<\/pre>\n<pre>sftp usuario@host.miservidor.com<\/pre>\n<p>A continuaci\u00f3n te pedir\u00e1 la contrase\u00f1a del usuario que hayas indicado. Una vez introducida, y pulsada la tecla \"Intro\", ya habr\u00e1s accedido a \u00e9l por SFTP.<\/p>\n<div id=\"attachment_6996\" style=\"width: 661px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/conexion-sftp.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-6996\" class=\" wp-image-6996\" src=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/conexion-sftp.jpg\" alt=\"Conexi\u00f3n SFTP\" width=\"651\" height=\"621\" srcset=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/conexion-sftp.jpg 666w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/conexion-sftp-300x286.jpg 300w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2018\/06\/conexion-sftp-600x572.jpg 600w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><p id=\"caption-attachment-6996\" class=\"wp-caption-text\">Conexi\u00f3n SFTP<\/p><\/div>\n<p>Para ver todas las opciones que tienes con el comando SFTP, puedes consultar la documentaci\u00f3n oficial, tan solo escribe en el terminal \"sftp -help\" y pulsa \"Intro\".<\/p>\n<pre>sftp -help<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"El primer paso para poder realizar una conexi\u00f3n por SFTP a un servidor dedicado, o VPS, es tener instalado un cliente SFTP. Lo m\u00e1s probable es que tu sistema Linux ya tenga uno instalado por defecto, en caso contrario, tienes que instalarlo previamente. Para verificar que tienes un cliente SFTP instalado tan solo tienes que introducir el comando \"sftp\" en&nbsp;<a href=\"https:\/\/hosting.airetech.es\/blog\/wiki\/conectarse-por-sftp-a-un-servidor-desde-ssh\/\" class=\"read-more\">Seguir leyendo<\/a>","protected":false},"author":1,"featured_media":6995,"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,"footnotes":""},"categories":[10,7,8,507,515,349,6],"tags":[216,213,214],"class_list":["post-6994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-servidores-dedicados","category-servidores-virtuales-vps","category-ssh-servidores-dedicados","category-ssh-servidores-virtuales-vps","category-ssh","category-wiki","tag-linux","tag-servidores-dedicados","tag-servidores-virtuales-vps","cat-10-id","cat-7-id","cat-8-id","cat-507-id","cat-515-id","cat-349-id","cat-6-id"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/6994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/comments?post=6994"}],"version-history":[{"count":3,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/6994\/revisions"}],"predecessor-version":[{"id":8380,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/6994\/revisions\/8380"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/media\/6995"}],"wp:attachment":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/media?parent=6994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/categories?post=6994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/tags?post=6994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}