From fc769be7894605459dedd2fe57ba800ceba7aa6f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 28 Jul 2021 18:56:36 +0200 Subject: [PATCH] updated cp script --- scripts/q7s-cp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/q7s-cp.py b/scripts/q7s-cp.py index 9de9d661..0c8c1a79 100755 --- a/scripts/q7s-cp.py +++ b/scripts/q7s-cp.py @@ -8,7 +8,13 @@ def main(): cmd = build_cmd(args) # Run the command print(f'Running command: {cmd}') - os.system(cmd) + result = os.system(cmd) + if result != 0: + print('') + print('Removing problematic SSH key and trying again..') + remove_ssh_key_cmd = 'ssh-keygen -f "${HOME}/.ssh/known_hosts" -R "[localhost]:1535"' + os.system(remove_ssh_key_cmd) + result = os.system(cmd) def handle_args():