Skip to content

Commit

Permalink
debugging ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
shinohara-rin committed May 3, 2024
1 parent f7cbc11 commit 72579f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
.DS_Store
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31102,8 +31102,9 @@ function start_vm(qemu_version, os, cpu, arch, bios, machine, filename, pubkey)
let runScript = core.getInput('run');
fs.writeFileSync('/tmp/run.sh', runScript);
spawnSync('scp', ['-o', 'StrictHostKeyChecking=no', '-i', pubkey, '-p', '2222', '/tmp/run.sh', 'root@localhost:/tmp/run.sh']);
let ssh = spawn('ssh', ['-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost']);
let ssh = spawn('ssh', ['-vvv', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost']);
ssh.stdout.pipe(process.stdout);
ssh.stderr.pipe(process.stderr);
ssh.stdin.write('chmod +x /tmp/run.sh');
ssh.stdin.write('bash /tmp/run.sh');
ssh.on('close', (code) => {
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ function start_vm(qemu_version, os, cpu, arch, bios, machine, filename, pubkey)
let runScript = core.getInput('run');
fs.writeFileSync('/tmp/run.sh', runScript);
spawnSync('scp', ['-o', 'StrictHostKeyChecking=no', '-i', pubkey, '-p', '2222', '/tmp/run.sh', 'root@localhost:/tmp/run.sh']);
let ssh = spawn('ssh', ['-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost']);
let ssh = spawn('ssh', ['-vvv', '-o', 'StrictHostKeyChecking=no', '-p', '2222', '-i', pubkey, 'root@localhost']);
ssh.stdout.pipe(process.stdout);
ssh.stderr.pipe(process.stderr);
ssh.stdin.write('chmod +x /tmp/run.sh');
ssh.stdin.write('bash /tmp/run.sh');
ssh.on('close', (code) => {
Expand Down

0 comments on commit 72579f7

Please sign in to comment.