diff --git a/dist/index.js b/dist/index.js index 536ce8a..4c6a671 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31126,8 +31126,9 @@ function setup_sshkey(pubkey, qemu_process, ready_callback) { concat += data.toString() if (concat.includes("root@freebsd:")) { qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n"); + qemu_process.stdin.write("service ssh restart\n"); qemu_process.stdin.write(`cat > /root/.ssh/authorized_keys <<<"${pubkeyContent}"\n`); - qemu_process.stdin.write(`cat /root/.ssh/authorized_keys`); + qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`); setTimeout(() => { ready_callback(qemu_process) }, 2000); waitForKey = () => { } } diff --git a/index.js b/index.js index ac6c18f..fa0a4d7 100644 --- a/index.js +++ b/index.js @@ -236,8 +236,9 @@ function setup_sshkey(pubkey, qemu_process, ready_callback) { concat += data.toString() if (concat.includes("root@freebsd:")) { qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n"); + qemu_process.stdin.write("service ssh restart\n"); qemu_process.stdin.write(`cat > /root/.ssh/authorized_keys <<<"${pubkeyContent}"\n`); - qemu_process.stdin.write(`cat /root/.ssh/authorized_keys`); + qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`); setTimeout(() => { ready_callback(qemu_process) }, 2000); waitForKey = () => { } }