AWS provides us a User with access key during initial setup, But in some case, we required another user with limited access only. We can't share sudoers user with anyone. In this blog, I will explain how to add new user and setup access key for remote access.
Prerequisites -
In order to add a new user, log in to your EC2 instance using SSH PuTTY connection.
Step 2- Create .SSH folder and authorized_keys with correct permission.
Go to the home directory of the newly added user.
To generate Public and Private Access key, I am using PuTTygen. Open PuTTygen and click on Generate. and during the process keep moving the cursor over the bank area to complete the process.
After Successful of key generation. Save the Private key somewhere in your PC. that will be used to make the connection with EC2 for new User Linux.
Step 4- Save the Private Key
In order to save Private key, choose Save private key buttion on the PuTTYgen windows.
At next screen save the Private file with name Linux.PPK
Step 5- Copy Public key and add to Authorized_key file at EC2 instance inside Linux user.
Select all and copy public keys as in below screenshot.
Now Go to EC2 instance and paste copied public key in the file name authorized_key. Open file in VIM editor
Save and Exit from the file.
Now you are ready to connect your EC2 instance using newly added user Linux.
Step 6- Test SSH connection using the Private key.
Open PuTTY software and enter server IP address and in the SSH auth section browse and add Private key file.
Connect PuTTY and enter user Linux when asked.
You have successfully connected with newly added user Linux.
!!Cheers!!
Prerequisites -
- One EC2 Linux instance - I am using Ubuntu 16.04 LTS
- A user with Sudo access - AWS default user Ubuntu
In order to add a new user, log in to your EC2 instance using SSH PuTTY connection.
$ sudo adduser linux
Step 2- Create .SSH folder and authorized_keys with correct permission.
Go to the home directory of the newly added user.
$ cd /home/linux/
Create a new directory with name .SSH$ mkdir .ssh
Change ownership and permission.$ chown -R linux:linux .ssh/ && chmod 700 .ssh/
Go to SSH directory$ cd .ssh/
Create file authorized_keys$ touch authorized_keys
Change ownership and set permission$ chown -R linux:linux authorized_keys && chmod 600 authorized_keys
Step 3- Generate Public and Private Access keyTo generate Public and Private Access key, I am using PuTTygen. Open PuTTygen and click on Generate. and during the process keep moving the cursor over the bank area to complete the process.
Step 4- Save the Private Key
In order to save Private key, choose Save private key buttion on the PuTTYgen windows.
Select all and copy public keys as in below screenshot.
$ vi authorized_keys
Paste public keys Now you are ready to connect your EC2 instance using newly added user Linux.
Step 6- Test SSH connection using the Private key.
Open PuTTY software and enter server IP address and in the SSH auth section browse and add Private key file.
!!Cheers!!
instagram takipçi satın al - instagram takipçi satın al - takipçi satın al - takipçi satın al - instagram takipçi satın al - takipçi satın al - instagram takipçi satın al - aşk kitapları - tiktok takipçi satın al - instagram beğeni satın al - youtube abone satın al - twitter takipçi satın al - tiktok beğeni satın al - tiktok izlenme satın al - twitter takipçi satın al - tiktok takipçi satın al - youtube abone satın al - tiktok beğeni satın al - instagram beğeni satın al - trend topic satın al - trend topic satın al - youtube abone satın al - beğeni satın al - tiktok izlenme satın al - sms onay - youtube izlenme satın al - tiktok beğeni satın al - sms onay - sms onay - perde modelleri - instagram takipçi satın al - takipçi satın al - tiktok jeton hilesi - pubg uc satın al - sultanbet - marsbahis - betboo - betboo - betboo
ReplyDelete