Quantcast
Channel: Linux – digitalwhores.net
Viewing all articles
Browse latest Browse all 47

SFTP allow user to login via SFTP

$
0
0

If we are just allowing both on AllowUsers in file /etc/ssh/sshd_config, new users won’t be allowed to access the server.

So!, lets edit it a add the new user. Find AllowUser line and add it there.

sudo nano /etc/ssh/sshd_config

This should look something like

#PermitRootLogin without-password
PermitRootLogin no
StrictModes yes
AllowUsers bofh newuser

Save and Exit!
Restart SSH

service ssh restart

Now the user!

addgroup --system filetransfer

usermod -G filetransfer username
chown root:root /home/username
chmod 755 /home/username

cd /home/username
chown username:filetransfer *

 

Hooray!

 


Viewing all articles
Browse latest Browse all 47

Trending Articles