08-12-2019, 02:10 AM
(08-09-2019, 02:56 AM)Rehan Wrote: Hi experts,
I am a gamer.A friend asked me to host his gaming server on VPS.I can not give access to whole directory to him.So i decided to create a separate user for him.I searched on google and found a method to add user restricted to a specific directory.I have executed all commands carefully and created a new user and group.Now whenever i login with my new account putty shows " remote side unexpectedly closed the connection ".
Here is the method i used to create new user and group.
Link
Please help me if there is any alternate method, or should i retry this more carefully once again.
My Current Operating System
Ubuntu 16
If you didn't already fix this...
Code: (Select All)
Match Group somegroup
ForceCommand internal-sftp
ChrootDirectory /somegroupdirectory/
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
The edit you made in /etc/ssh/sshd_config from above may have caused your SSH server to not accept connections. Try something like this and your SSH should then work again:
Code: (Select All)
sudo apt-get install --reinstall openssh-client
Code: (Select All)
sudo dpkg-reconfigure openssh-server