Shaare your links...
6236 links
Shared links on http://www.la-pub-dans-les-films.fr/shaarli/ Home Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Links per page: 20 50 100
page 1 / 1
1 results for tags sftp x
  • user with sftp access only
    Based on the search results provided, here are the key steps to set up a user with SFTP access only, without shell access:

    1. Create a new user account for SFTP access, for example "mysftp":[2]
      ```
      adduser mysftp
      passwd mysftp
      ```

    2. Create a directory for the SFTP user to access, for example "/var/sftp/uploads":[2]
      ```
      mkdir -p /var/sftp/uploads
      chown root:root /var/sftp
      chmod 755 /var/sftp
      chown mysftp:mysftp /var/sftp/uploads
      ```

    3. In the SSH server configuration file (/etc/ssh/sshd_config), add the following settings:[2][3]
      ```
      Match User mysftp
          ForceCommand internal-sftp
          PasswordAuthentication yes
          ChrootDirectory /var/sftp
          PermitTunnel no
          AllowAgentForwarding no
          AllowTcpForwarding no
          X11Forwarding no
      ```
      This restricts the "mysftp" user to SFTP access only, without shell access.

    4. Restart the SSH service to apply the changes:[2]
      ```
      systemctl restart sshd
      ```

    5. Verify the user can only access SFTP and not the shell:[2]
      ```
      ssh mysftp@localhost # Should show "This service allows sftp connections only"
      sftp mysftp@localhost # Should allow SFTP access
      ```

    The key points are to create a dedicated SFTP user, restrict their access to a specific directory, and use the SSH configuration to force the use of SFTP without shell access. This approach allows granting limited file transfer access without full system access.[1][2][3][4][5]

    Citations:
    [1] https://unix.stackexchange.com/questions/503312/is-it-possible-to-grant-users-sftp-access-without-shell-access-if-yes-how-is-i
    [2] https://community.hetzner.com/tutorials/add-sftp-only-user-no-ssh-access-on-centos-7/
    [3] https://askubuntu.com/questions/534675/restrict-users-to-sftp-access-only
    [4] https://thunderysteak.github.io/sftp-user-chroot
    [5] https://www.digitalocean.com/community/questions/trying-to-setup-a-sftp-user-with-limited-access
    Tue May 7 10:33:25 2024 - permalink -
    - /shaare/GAxM8w
    sftp
Links per page: 20 50 100
page 1 / 1
Shaarli 0.0.41 beta - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr.