Skip to content

Commit

Permalink
Update init to support AWS EC2
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineleclair committed Jun 13, 2024
1 parent ec51ac9 commit 993a012
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,14 @@ async function uploadRootSshPublicKey({
stdin: password,
progressBar: undefined,
})
// on AWS EC2 Ubuntu, they have this preventing you from logging in as root, remove it.
await runSshCommand({
ssh,
command: `sudo sed -i '/Please login as the user/d' /root/.ssh/authorized_keys`,
verbose,
stdin: password,
progressBar: undefined,
})
let keyAlreadyAuthorized
try {
await runSshCommand({
Expand Down

0 comments on commit 993a012

Please sign in to comment.