Skip to content

Commit

Permalink
use ssh_config instead of ssh-keyscan
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsimcall committed May 1, 2024
1 parent fee56c9 commit eb01817
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cloudformation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,12 @@ Resources:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
unzip -q -d /tmp /tmp/awscliv2.zip && rm -f /tmp/awscliv2.zip && /tmp/aws/install && rm -rf /tmp/aws

# scan for other SSH hosts
ssh-keyscan highside ${HighSideInstance.PrivateDnsName} >> /etc/ssh/ssh_known_hosts
ssh-keyscan salsa-registry ${SalsaImageRegistryInstance.PrivateDnsName} >> /etc/ssh/ssh_known_hosts
ssh-keyscan nat ${NatInstance.PrivateDnsName} >> /etc/ssh/ssh_known_hosts
# Disable the "do you trust this SSH host" messages
cat << EOF >> /home/lab-user/.ssh/config
Host *
StrictHostKeyChecking false
EOF
chown -v lab-user:lab-user /home/lab-user/.ssh/config

# Setup VNC
yum -y install "@GNOME" firefox tigervnc-server
Expand Down

0 comments on commit eb01817

Please sign in to comment.