0% found this document useful (0 votes)
3 views1 page

cmd ubuntu user creation

Uploaded by

fzwayaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

cmd ubuntu user creation

Uploaded by

fzwayaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

ssh-rsa

AAAAB3NzaC1yc2EAAAADAQABAAABAQDEELncesN6v9VAKFZ5Hzpbai81SorGfzettPY72octia8zWA68hPI
DHdtC/
XJ91PuLmPrB+ynL59atG7xGthix9nm06ntYG1MgP8cGHlNAb1Mxwx64dIJbE48ZJkSCB8dxroQD7QqlnIh4
xds08+0AN5P/
UhBJgEmhdo4xDHrA6ayApgUByxkqnKADBNyjtNf8Clq0O08ycPvCFe7KevU5OQdTdLXrKpY+HOOpJUTmWxv
cN9Kpq+eYaRM6eyDPSMiYitxJ900pseKn/
WFbiRcE0ne7aHcNxzGszM208VEHHpoOnV+EOkEz2ofzNjk4NsXH4KqWe0IAnHwyq4kJSIAh ubuntuGUI

ssh-keygen -y -f /path_to_key_pair/imran.ppk

aws ec2 describe-key-pairs --key-names imran.ppk --include-public-key

curl http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key

[February 20, 2023, 5:40 PM] Bengriche, Said: sudo adduser username
[February 20, 2023, 5:42 PM] Bengriche, Said: Add new user accounts with SSH access
to an EC2 Linux
instanceaws.amazon.comhttps://aws.amazon.com/premiumsupport/knowledge-center/new-
user-accounts-linux-instance/
[February 20, 2023, 5:42 PM] Bengriche, Said: sudo adduser new_user --disabled-
password
[February 20, 2023, 5:45 PM] Bengriche, Said: sudo deluser --remove-home suresh
[February 20, 2023, 5:50 PM] Bengriche, Said: ssh-keygen -y -f
/path_to_key_pair/my-key-pair.pem
[February 20, 2023, 5:52 PM] Bengriche, Said: cat ~/.ssh/authorized_keys
[February 20, 2023, 5:54 PM] Bengriche, Said: sudo vi ~/.ssh/authorized_keys
[February 20, 2023, 5:58 PM] Bengriche, Said: ESC
[February 20, 2023, 5:58 PM] Bengriche, Said: :x
[February 20, 2023, 5:58 PM] Bengriche, Said: :
[February 20, 2023, 5:58 PM] Bengriche, Said: x
[February 20, 2023, 5:59 PM] Bengriche, Said: image.png
[February 20, 2023, 6:00 PM] Bengriche, Said: cat ~/.ssh/authorized_keys
[February 20, 2023, 6:06 PM] Bengriche, Said: ssh-keygen -y -f
/path_to_key_pair/my-key-pair.ppk
[February 20, 2023, 6:09 PM] Bengriche, Said: aws ec2 describe-key-pairs --key-
names key-pair-name --include-public-key
[February 20, 2023, 6:14 PM] Bengriche, Said: aws configure
[February 20, 2023, 6:16 PM] Bengriche, Said: image.png
[February 20, 2023, 6:18 PM] Bengriche, Said: curl
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
[February 20, 2023, 6:20 PM] Bengriche, Said: TOKEN=`curl -X PUT
"http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds:
21600"` \
&& curl -H "X-aws-ec2-metadata-token: $TOKEN" –v
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
[February 20, 2023, 6:27 PM] Bengriche, Said: ssh -
[February 20, 2023, 6:28 PM] Bengriche, Said: vi ~/.ssh/authorized_keys

zvolv

You might also like