7/8/19

Servidor SFTP con Ubuntu Server 18.04

Para publicar un SFTP sobre un servidor Ubuntu 18.4 estos son los pasos a seguir:

Creamos un grupo para usuarios de SFTP:

sudo groupadd sftp

Creamos un usuario que solo tendrá acceso vía SFTP y no shell:
NOTA: Nos solicitará varios campos pero solo la contraseña es obligatoria.

sudo adduser --shell /bin/false ftpuser

Ingresamos el usuario al Grupo:

sudo usermod -a -G sftp sftpuser

Creamos la carpeta para el SFTP:

sudo mkdir -p /var/sftp/archivos 

Le otorgamos propiedad a los miembros del Grupo:

sudo chgrp sftp /var/sftp/archivos 
sudo chmod -R 770 /var/sftp/files

Editamos el archivo de confiuración sshd_config:

sudo vim /etc/ssh/sshd_config

Y agregamos al final las siguientes lineas:

Match group sftp
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /var/sftp
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no


Reiniciamos el servicio SSH:

sudo systemctl restart ssh

Y con esto ya tenemos configurado un SFTP que atenderá por la IP del servidor mediante el puerto 22.

4 comentarios :

  1. How to activate prime video? Most of the people think about that how to register prime video and what are the step plus factor about the price. So I suggest that prime video is a part of amazon prime and if you have an account of amazon prime that same account you can use for prime video. Visit - Read More

    ResponderEliminar
  2. Great post! If anyone wants extra savings, try applying a working Noon discount code UAE. The Noon coupon code today is giving awesome offers.
    More info:-
    noon coupon code uae
    noon promo code uae
    noon grocery promo code

    ResponderEliminar
  3. Excellent post! The growth and quality of schools in Dwarka are truly impressive. New Era Public School continues to lead with its strong academic programs and supportive learning environment, making it a top choice for parents.
    More Info:-
    Best Schools in Dwarka Delhi
    Dwarka schools
    Best School in Dwarka

    ResponderEliminar