-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
#!/usr/bin/env fish
# https://microsounds.github.io/notes/termux-ssh-fingerprint.htm
# Unlock keystore with fingerprint
termux-fingerprint >/dev/null
# Sign nonce value
# No ed25519 support sad
# THIS CAN'T BE A ONE-LINER
# Sure it seems more elegant to sign the result of termux-fingerprint with a one-liner
# But this can cause weird bugs so let's just play it safe
# Since the output of termux-fingerprint can change after errors
# And in a one-liner they get executed in parallel
echo nonce | termux-keystore sign default SHA256withRSA | base64 -w 0