@@ -31127,7 +31127,6 @@ function waitFor(trigger, callback) {
31127
31127
function setup_sshkey(pubkey, qemu_process, ready_callback) {
31128
31128
const pubkeyContent = fs.readFileSync(pubkey, { encoding: "utf-8" });
31129
31129
show_message("info", "Setting up SSH key for QEMU");
31130
- qemu_process.stdin.write("root\n");
31131
31130
let waitForPrompt = waitFor("root@freebsd:", () => {
31132
31131
waitForPrompt = () => { }
31133
31132
let waitForKey = waitFor(pubkeyContent, () => {
@@ -31139,18 +31138,17 @@ function setup_sshkey(pubkey, qemu_process, ready_callback) {
31139
31138
waitForKey(data)
31140
31139
})
31141
31140
show_message("debug", "Writing to stdin")
31142
- qemu_process.stdin.write(`echo "${pubkeyContent}" > /root/.ssh/authorized_keys\n`, () => {
31143
- qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`, () => {
31144
- qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n", () => {
31145
- qemu_process.stdin.write("/etc/rc.d/sshd restart\n");
31146
- });
31147
- });
31148
- });
31141
+ // qemu_process.stdin.write(`echo "${pubkeyContent}" > /root/.ssh/authorized_keys\n`, () => {
31142
+ // qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`, () => {
31143
+ qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && /etc/rc.d/sshd restart\n");
31144
+ // });
31145
+ // });
31149
31146
})
31150
31147
qemu_process.stdout.on('data', (data) => {
31151
31148
waitForPrompt(data)
31152
31149
process.stdout.write(data.toString())
31153
31150
});
31151
+ qemu_process.stdin.write("root\n");
31154
31152
}
31155
31153
31156
31154
function ensure_install_deps() {
0 commit comments