Skip to content

Commit

Permalink
fix identity file
Browse files Browse the repository at this point in the history
  • Loading branch information
Neilpang committed Jul 7, 2022
1 parent 855aafa commit a0ca379
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function sleep(ms) {
async function execSSH(cmd, desp = "") {
core.info(desp);
core.info("exec ssh: " + cmd);
await exec.exec("ssh -t -i " + __dirname + "/mac.id_rsa openbsd", [], { input: cmd });
await exec.exec("ssh -t openbsd", [], { input: cmd });
}


Expand Down Expand Up @@ -79,6 +79,8 @@ async function setup(nat, mem) {
fs.appendFileSync(path.join(process.env["HOME"], "/.ssh/config"), " User root" + "\n");
fs.appendFileSync(path.join(process.env["HOME"], "/.ssh/config"), " HostName localhost" + "\n");
fs.appendFileSync(path.join(process.env["HOME"], "/.ssh/config"), " Port 2224" + "\n");
fs.appendFileSync(path.join(process.env["HOME"], "/.ssh/config"), " IdentityFile=~/.ssh/mac.id_rsa\n");

fs.appendFileSync(path.join(process.env["HOME"], "/.ssh/config"), "StrictHostKeyChecking=accept-new\n");


Expand Down Expand Up @@ -113,6 +115,8 @@ async function setup(nat, mem) {
await exec.exec("chmod 700 " + sshHome);


await io.mv(path.join(workingDir, "/mac.id_rsa"), "/Users/runner/.ssh/mac.id_rsa");


let vmName = "openbsd";

Expand Down

0 comments on commit a0ca379

Please sign in to comment.