Skip to content

Commit

Permalink
Generate host keys using ssh-keygen
Browse files Browse the repository at this point in the history
Added a step to generate host keys using "sudo ssh-keygen -A" so that sshd will start on the Linux machine image.
  • Loading branch information
tenthirtyam committed Jul 21, 2021
1 parent 653e108 commit e11491e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
8 changes: 6 additions & 2 deletions scripts/linux/centos-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ EOF
echo '> Changeing script permissions for execution ...'
sudo chmod +x /tmp/clean.sh

### Executes the cleauup script. ###
echo '> Executing the cleanup script ...'
### Runs the cleauup script. ###
echo '> Running the cleanup script ...'
sudo /tmp/clean.sh

### Generate host keys using ssh-keygen ###
echo '> Generating host keys ...'
sudo ssh-keygen -A

### All done. ###
echo '> Done.'
8 changes: 6 additions & 2 deletions scripts/linux/photon-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,13 @@ EOF
echo '> Changeing script permissions for execution ...'
sudo chmod +x /tmp/clean.sh

### Executes the cleauup script. ###
echo '> Executing the cleanup script ...'
### Runs the cleauup script. ###
echo '> Running the cleanup script ...'
sudo /tmp/clean.sh

### Generate host keys using ssh-keygen ###
echo '> Generating host keys ...'
sudo ssh-keygen -A

### All done. ###
echo '> Done.'
8 changes: 6 additions & 2 deletions scripts/linux/redhat-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,14 @@ EOF
echo '> Changeing script permissions for execution ...'
sudo chmod +x /tmp/clean.sh

### Executes the cleauup script. ###
echo '> Executing the cleanup script ...'
### Runs the cleauup script. ###
echo '> Running the cleanup script ...'
sudo /tmp/clean.sh

### Generate host keys using ssh-keygen ###
echo '> Generating host keys ...'
sudo ssh-keygen -A

#### Unegister from Red Hat Subscription Manager. ###
echo '> Unegistering from Red Hat Subscription Manager ...'
subscription-manager unsubscribe --all
Expand Down
8 changes: 6 additions & 2 deletions scripts/linux/rocky-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ EOF
echo '> Changeing script permissions for execution ...'
sudo chmod +x /tmp/clean.sh

### Executes the cleauup script. ###
echo '> Executing the cleanup script ...'
### Runs the cleauup script. ###
echo '> Running the cleanup script ...'
sudo /tmp/clean.sh

### Generate host keys using ssh-keygen ###
echo '> Generating host keys ...'
sudo ssh-keygen -A

### All done. ###
echo '> Done.'
8 changes: 6 additions & 2 deletions scripts/linux/ubuntu-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,13 @@ EOF
echo '> Changeing script permissions for execution ...'
sudo chmod +x /tmp/cleanup.sh

### Executes the cleauup script. ###
echo '> Executing the cleanup script ...'
### Runs the cleauup script. ###
echo '> Running the cleanup script ...'
sudo /tmp/cleanup.sh

### Generate host keys using ssh-keygen ###
echo '> Generating host keys ...'
sudo ssh-keygen -A

### All done. ###
echo '> Done.'

0 comments on commit e11491e

Please sign in to comment.