H
H
hrvasiliy2015-07-11 07:32:33
linux
hrvasiliy, 2015-07-11 07:32:33

How to create external user ubuntu server?

I can't figure out how to create a user for a specific directory in ubuntu server. I read a lot of manuals, but I did not meet normal ones. Either the user can leave his directory, or something else. Trying to make it so that a specific user only has access to a specific folder on the server and can connect there via SSH and SFTP so that he can't leave that folder but can edit all the files in the folder he's been given + work with GIT via SSH.
With the usual creation of a user in ubuntu, he can immediately connect to SSH and view all the files on the server, but not edit them. Here, as I understand it, you just need to remove access and read access to some files.
After editing the sshd_config file:

Match User john
    ChrootDirectory /home/john
    ForceCommand internal-sftp
    AllowTCPForwarding no
    X11Forwarding no

The ability to connect via SSH from the user falls off. I can not find a good manual on how to set up SSH + SFTP for an external user, the way it is implemented on hosting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-07-11
@zmeyjr

google ssh chroot

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question