Skip to main content

Posts

Showing posts from July, 2023

how to setup password for an AWS EC2 running instance

The AWS EC2 Linux instance uses a .pem private key file to authenticate the default ubuntu user account. Let us learn about how to set up a password on your running EC2 instance, Prerequisites You have ec2 instance running You have root access to ec2 instance Step 1 Connect to your Linux ec2 instance via putty (/ssh). Step 2 Login to your running instance Step 3 Execute below command: sudo passwd ec2-user And write the password Step 4 Now it’s time to go to the directory /etc/ssh and follow below command sudo vim sshd_config Step 5 After you apply the command,  Press “i” and Now go to the “passwordauthentication” and write “yes” After change, it please save it Perfect Step 6 Last command is sudo service sshd restart and disconnect and login again using username and password