Minimal Setup Ubuntu SSH User/Pass Login in 3 Steps

tanut aran
May 23, 2021

--

Warning: this is not secure at all, only for testing things out.

Step 1: Create User/pass

and also the home directory for this user

sudo useradd my-temp-user
sudo passwd my-temp-user
sudo mkdir /home/my-temp-user// Grant perm
sudo chgrp my-temp-user /home/my-temp-user
sudo chown my-temp-user /home/my-temp-user

Step 2: Enable password login in SSHD

sudo vim /etc/ssh/sshd_config

Looking for this line, change it from no to yes

PasswordAuthentication yes

Then restart it to take effect

sudo systemctl restart sshd

Step 3: Done test login with the new user

ssh my-temp-user@10.1.2.3

Bingo now we logged in with the new user

--

--

tanut aran
tanut aran

Written by tanut aran

Co-founder and Coder at work !

No responses yet