sedunlocksrv-pba icon indicating copy to clipboard operation
sedunlocksrv-pba copied to clipboard

Adjustments necessary for SSH unlock

Open decafgeek opened this issue 2 months ago • 1 comments

Hello,

I ran into some issues trying to get the SSH server working for remote unlock. It looks like dropbear (and openssh as well) expect specific permissions on the directories and files related to authorized_keys or it will bail with a very uninformative error message related to "publickey" - I exclusively used the Docker method to build, so perhaps this isn't encountered on a 'real' build environment.

To fix this I had to replace lines 142-144 of build.sh with the following:

mkdir -p "${TMPDIR}/core/home/tc/.ssh"
cp ./ssh/authorized_keys "${TMPDIR}/core/home/tc/.ssh/"
chown -R 1001 "${TMPDIR}/core/home/tc/.ssh"
chmod 700 "${TMPDIR}/core/home/tc/.ssh"
chmod 600 "${TMPDIR}/core/home/tc/.ssh/authorized_keys"
cp ./ssh/ssh_sed_unlock.sh "${TMPDIR}/core/home/tc/"

I can do a pull request if you'd like but it seemed overkill for these trivial changes.

decafgeek avatar Apr 14 '24 20:04 decafgeek