Cara Menambah User Account di SSH Menggunakan CentOS

Posted by Bagus Swara On 7:37 PM

Login to your server as a user with root privilages

1.) Adding the user
Run the following command:

adduser username

Replace username with the username you desire.

2.) Changing the password
You must change the password for the account, so they can login to SSH. Do that by running:

passwd username

Replace username with the user you just added

3.) Logging in
The user can now login to SSH, however, they are only able to view their home directory, for instance, my user is nick. He is only able to view:

/home/nick

4.) Modifying the user
If you would like to modify the user so they can browse more directories and see files, modify the following file:

/etc/passwd

Change the path /home/username (username will be replaced with the user you added) to the directory you would like to grant them access to. For example, if I wanted to grant my user nick access to /etc/ so he could see all of the files in /etc/ and the subdirectories, I would do the following:

Before:

before
After:

after
The user nick now has access to the /etc directory and all subdirectories inside /etc. However, he can only view and not modify.

5.) The End
You have now created an SSH user, with a password, and only allowed him to see the /etc directory. Remember, you can modify /etc to be whatever directory you wish!

Post a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( :-q =))

Silahkan dishare dan tinggalkan komentar untuk kemajuan blog ini.
Terima kasih atas komentarnya brada.....!

Bagus Swara

Blog ini ane buat dengan tujuan sabagai E-Book electronic jadi siapa saja yang membutuhan artikel yang ada di blog ini silakan di digunkan, semoga apa yang ane sajikan dapat bermanfaat bagi ente semua....Read More

Langganan

Masukan Email Ente:

Postingan terbaru

Koment Terbaru

Followers