Preconfigure SSH server on test image

* This allows logging in to freshly built image using ssh.

Change-Id: I15baeee455827b73f12e1a222b166bd7975786dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10426
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Kacper Kasper <[email protected]>
Reviewed-by: Priyanshu Gupta <[email protected]>
This commit is contained in:
Kacper Kasper
2026-03-15 20:55:27 +00:00
parent 36367253cd
commit ee10ca4b42
5 changed files with 34 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
sshd_config_path=/system/settings/ssh/sshd_config
/bin/sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/;' $sshd_config_path
/bin/sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/;' $sshd_config_path
/bin/sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/' $sshd_config_path
/bin/passwd -d user
/bin/sshd -D & # sshd fails to start on first boot