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():