Check SSH version (fixes #377)

This commit is contained in:
LukeZGD 2024-01-08 07:53:22 +08:00
parent 14963e9a2d
commit 73583a770a
2 changed files with 6 additions and 1 deletions

View File

@ -4,4 +4,3 @@ Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa

View File

@ -292,6 +292,12 @@ set_tool_paths() {
idevicererestore+="$dir/idevicererestore"
ipwnder+="$dir/ipwnder"
irecovery2+="$dir/irecovery2"
cp ../resources/ssh_config .
if [[ $(ssh -V 2>&1 | grep -c SSH_8.8) == 1 || $(ssh -V 2>&1 | grep -c SSH_8.9) == 1 ||
$(ssh -V 2>&1 | grep -c SSH_9.) == 1 || $(ssh -V 2>&1 | grep -c SSH_10.) == 1 ]]; then
echo " PubkeyAcceptedAlgorithms +ssh-rsa" >> ssh_config
fi
scp2="scp -F ../resources/ssh_config"
ssh2="ssh -F ../resources/ssh_config"
}