🔒 Closed Enable root login with password of AWS EC2/Lightsail Instance

Status
Not open for further replies.
1. In terminal, first run
Code:
sudo su -

2. Then edit sshd config
Code:
nano /etc/ssh/sshd_config

3. Find these lines

#PermitRootLogin prohibit-password
PasswordAuthentication no

Change them respectively to these

PermitRootLogin yes
PasswordAuthentication yes

note: uncomment or remove the "#" character

Ctrl+X then Y then Enter to exit

4. Then restart sshd
Code:
systemctl restart sshd

5. Set password for root
Code:
passwd root

Enter your desired password
note: no characters will appear on the screen as you type, just proceed

To disable PEM/PPK login, repeat Step 2

Then find this line

#PubkeyAuthentication yes

Change to

PubkeyAuthentication no

Ctrl+X then Y then Enter to exit

Then restart sshd, repeat Step 4


Then logout and try to login as root
 

Attachments

  • Screenshot_20210110_075752_com.sonelli.juicessh.webp
    Screenshot_20210110_075752_com.sonelli.juicessh.webp
    34.1 KB · Views: 66
Status
Not open for further replies.

About this Thread

  • 94
    Replies
  • 14K
    Views
  • 14
    Participants
Last reply from:
5h4nn0X

Online now

Members online
1,125
Guests online
910
Total visitors
2,035

Forum statistics

Threads
2,277,013
Posts
28,973,733
Members
1,229,686
Latest member
rubellemax1998
Back
Top