From 6bcee2b8f10d588b0a63c3da7e3709d39f24408d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Frantzv=C3=A5g=20Karlsmoen?= Date: Tue, 2 Feb 2021 22:24:52 +0100 Subject: [PATCH] Add Fedora 33 specific checks as a result of crypto policy changes --- reStream.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/reStream.sh b/reStream.sh index 8eb6e7d..ef34d01 100755 --- a/reStream.sh +++ b/reStream.sh @@ -89,8 +89,24 @@ while [ $# -gt 0 ]; do done ssh_cmd() { + OS="" + VER="" + echo "[SSH]" "$@" >&2 - ssh -o ConnectTimeout=1 -o PasswordAuthentication=no "root@$remarkable" "$@" + + if [ -f /etc/os-release ]; then + . /etc/os-release + OS=$NAME + VER=$VERSION_ID + fi + + if [ "$OS" == "Fedora" ]; then + if [ "$VER" == "33" ]; then + ssh -o ConnectTimeout=1 -o PasswordAuthentication=no "remarkable" "$@" + fi + else + ssh -o ConnectTimeout=1 -o PasswordAuthentication=no "root@$remarkable" "$@" + fi } # SSH_CONNECTION is a variable on reMarkable => ssh '' instead of ssh ""