How to troubleshoot "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" after launching the scp command [EN]

First of all, you need to run the scp command either on the command line if you are using Linux or Powershell if you are using Windows :

Warning: you need to run this command in the directory in which you kept the « data_engineering_machine.pem » file and use the public IP of your VM:

Then run the command ssh-keygen -R on the console or Powershell


Run the scp command again and type « Yes ».

At the end of execution, the file will be found in the same directory as the pem key.

:warning:Warning! If you get this message:

You should also specify the path to the directory where you want to save the file:

This way you can transfer the files on your VM to your personal computer.

Hello Justine ,

pour corriger le problème de la clé distance qui a changé , ll faudra exécuter la commande suivante sur la machine locale :

del ~/.ssh/known_hosts

sur windows ou la suivante sur linux :

rm -f ~/.ssh/known_hosts