When connecting to a Git server from MATLAB I keep getting the message "The authenticity of host ... can't be established. RSA key fingerprint is ... . Are you sure you want to continue connecting?" even though I've said yes multiple times.
9 views (last 30 days)
Show older comments
MathWorks Support Team
on 3 May 2021
Answered: MathWorks Support Team
on 4 May 2021
When connecting to a Git server from MATLAB I keep getting the message "The authenticity of host ... can't be established. RSA key fingerprint is ... . Are you sure you want to continue connecting?" even though I've said yes multiple times.
Every time I reboot my machine I need to re-accept this prompt. Afterward, I don't need to re-accept this prompt until I reboot the machine again.
Accepted Answer
MathWorks Support Team
on 3 May 2021
Please try the following troubleshooting steps:
1) Open a bash or Git Bash shell on your machine.
2) Find the hostname or IP address of the server on which your remote Git repository is hosted.
3) Run the following command in your bash shell to determine if you already have an entry for the server's key fingerprint in your "<HOME>/.ssh/known_hosts" file.
$ ssh-keygen -F <hostname>/<ip address>
where <hostname>/<ip address> is either the actual hostname or IP address you found in step 2).
e.g.
$ ssh-keygen -F github.com
3.1) If you do not see any output, then you do not have an entry for the server in the known_hosts file.
Proceed to step 4.
3.2) If you do see output from this command, verify whether the output matches that of the following command.
$ ssh-keyscan -t rsa <hostname>/<ip address>
e.g.
$ ssh-keyscan -t rsa github.com
If the output is different, then you need to add a new entry for the server to the known_hosts file. Proceed to step 4.
4) Navigate to your home folder, which should contain your .ssh directory. This is typically "C:\Users\<your-username>" on Windows and "~/" on Linux and macOS.
5) Run the following commands and verify whether the issue is resolved.
$ cd .ssh
$ ssh-keyscan -t rsa <hostname>/<ip address> >> known_hosts
e.g.
$ cd .ssh
$ ssh-keyscan -t rsa github.com >> known_hosts
NOTE: You should now see the proper output from the command in step 3.
0 Comments
More Answers (0)
See Also
Categories
Find more on Source Control Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!