diff --git a/Snake.nocomments.sh b/Snake.nocomments.sh index 23c73bc..f97cebe 100644 --- a/Snake.nocomments.sh +++ b/Snake.nocomments.sh @@ -390,7 +390,7 @@ ssh_extra_options=(-oHostkeyAlgorithms=+ssh-rsa -oKexAlgorithms=+diffie-hellman- for ssh_extra_option in "${ssh_extra_options[@]}"; do [[ "$(ssh "$ssh_extra_option" 2>&1)" =~ Bad\ protocol\ 2\ host\ key\ algorithms|Bad\ SSH2\ KexAlgorithms|Bad\ key\ types|diffie-hellman-group1-sha1|ssh-rsa ]] || ssh_options+=("$ssh_extra_option") done -ssh_extra_options="-oPubkeyAcceptedKeyTypes=+ssh-rsa" +ssh_extra_option="-oPubkeyAcceptedKeyTypes=+ssh-rsa" [[ "$(ssh "$ssh_extra_option" 2>&1)" =~ Bad\ configuration\ option|pubkeyacceptedkeytypes ]] || ssh_options+=("$ssh_extra_option") } init_current_ips() { diff --git a/Snake.sh b/Snake.sh index ce12fff..4feaeda 100755 --- a/Snake.sh +++ b/Snake.sh @@ -664,7 +664,7 @@ check_ssh_options() { for ssh_extra_option in "${ssh_extra_options[@]}"; do [[ "$(ssh "$ssh_extra_option" 2>&1)" =~ Bad\ protocol\ 2\ host\ key\ algorithms|Bad\ SSH2\ KexAlgorithms|Bad\ key\ types|diffie-hellman-group1-sha1|ssh-rsa ]] || ssh_options+=("$ssh_extra_option") done - ssh_extra_options="-oPubkeyAcceptedKeyTypes=+ssh-rsa" + ssh_extra_option="-oPubkeyAcceptedKeyTypes=+ssh-rsa" [[ "$(ssh "$ssh_extra_option" 2>&1)" =~ Bad\ configuration\ option|pubkeyacceptedkeytypes ]] || ssh_options+=("$ssh_extra_option") }