Vigyata.AI
Is this your channel?

How to Add a User with SSH Access on Ubuntu

2.8K views· 12 likes· 4:58· Mar 5, 2024

🛍️ Products Mentioned (9)

In this video, I'll guide you through the essential steps of adding a new user with SSH access on your Ubuntu server. Whether you're a seasoned system administrator or just starting with server management, this tutorial is designed to make the process seamless and secure. I'll demonstrate the creation of a new user, configuration of SSH keys, and ensure a hassle-free connection process, ensuring you can access your Ubuntu server with ease. ⭐Offers⭐ 🎁Save One Time Setup Fee on Contabo: https://bit.ly/contabonosetupfee 🎁Get up to 50% off on OVHCloud: https://bit.ly/ovh50off 🎁Claim $200 Server Credits on DigitalOcean: https://bit.ly/digitaloceanfree100 🎁Claim $250 Server Credits on Vultr: https://bit.ly/vultrfree150 🎁Claim $100 Server Credits on Linode: https://bit.ly/linodefree100 🎁Claim €20 Free Credits on Hetzner: https://bit.ly/3Uup6bE 👉How to Grant Root Access without Root on Ubuntu: https://youtu.be/2h8K7vhSU3c ✅For any further queries or suggestions, feel free to message or email on: 👉Email: hello@technicalsahil.com ✅You can follow and contact me on social media as well: 👉Medium: http://bit.ly/3TXwcVj 👉Quora: https://bit.ly/40R8dtn 👉Github: http://bit.ly/3TZdnBk #SSHAccess #UserManagement #ServerSecurity #Ubuntu

About This Video

Hello everyone, in this video I showed you step-by-step how you can add a new user on Ubuntu and allow that user to login via SSH in a clean and secure way. First, I login as root and create the user using `adduser` (I prefer this over `useradd` because `useradd` can feel a bit confusing, but `adduser` does the same job in a simpler way). Then I set the password, fill the basic details (most fields are optional), and verify the user is created properly. After that, I switch from root to the new user using `su` and confirm I’m inside the user’s home directory. The main important part is SSH access: by default, the user won’t be able to login via SSH until we allow it in the SSH configuration. So I edit `/etc/ssh/sshd_config`, add an `AllowUsers` entry for the user (and root if needed), save it, and restart SSH using `systemctl restart sshd`. Finally, I test the SSH login with the new user and explain one key takeaway: this user can login, but it’s not a sudo user yet, so it won’t have root-level access. I’ll cover making the user sudo in the next video.

Frequently Asked Questions

🎬 More from Technical Sahil