#cat /etc/ssh/sshd_config | grep PasswordAuthentication
# sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
# cat /etc/ssh/sshd_config | grep PasswordAuthentication
# systemctl restart sshd
# useradd -s /bin/bash -m ansible; echo "ansible:redhat" | sudo chpasswd
# echo "ansible ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# cat /etc/ssh/sshd_config | grep PasswordAuthentication
# systemctl restart sshd
# useradd -s /bin/bash -m ansible; echo "ansible:redhat" | sudo chpasswd
# echo "ansible ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
System information of AWS Servers.
root@ip-172-31-53-81:~# dmidecode | grep -A5 "System Information"
System Information
Manufacturer: Xen
Product Name: HVM domU
Version: 4.11.amazon
Serial Number: ec2de920-d8fb-8e4d-f4f2-3739b0ee3609
UUID: ec2de920-d8fb-8e4d-f4f2-3739b0ee3609
root@ip-172-31-53-81:~# uname -a
Linux ip-172-31-53-81 5.15.0-1048-aws #53~20.04.1-Ubuntu SMP Wed Oct 4 16:44:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
System information of Azure Servers.
root@db01:~# dmidecode | grep -A5 "System Information"
System Information
Manufacturer: Microsoft Corporation
Product Name: Virtual Machine
Version: Hyper-V UEFI Release v4.1
Serial Number: 0000-0007-4189-7891-4160-3653-44
UUID: 66f58203-d6a4-4f20-a4ee-4e004a8a8e4e
root@db01:~#
System information of GCP Servers.
[root@linux01 ~]# dmidecode | grep -A5 "System Information"
System Information
Manufacturer: Google
Product Name: Google Compute Engine
Version: Not Specified
Serial Number: GoogleCloud-D36CA966FD21346E7EA115D81FE45FFB
UUID: d36ca966-fd21-346e-7ea1-15d81fe45ffb
[root@linux01 ~]#
User creation during build.
GCP -> Create an Instance -> Advanced Options -> Automation --> Startup script
#cat /etc/ssh/sshd_config | grep PasswordAuthentication
# sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
# cat /etc/ssh/sshd_config | grep PasswordAuthentication
# systemctl restart sshd
# useradd -s /bin/bash -m ansible; echo "ansible:redhat" | sudo chpasswd
# echo "ansible ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
# cat /etc/ssh/sshd_config | grep PasswordAuthentication
# systemctl restart sshd
# useradd -s /bin/bash -m ansible; echo "ansible:redhat" | sudo chpasswd
# echo "ansible ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
No comments:
Post a Comment