When I'm trying pair to my mac, I get the following: An error occurred while trying to establish an SSH connection with SSH keys to 'IP'
. However, using ssh to connect to my mac through cmd it works just fine but for some reason VS fails to do this.
Asked
Active
Viewed 469 times
1

Zita
- 121
- 1
- 9
-
1I have the same problem. People report that modifying sshd_config worked for them but that initially didn't work for me. Then it worked after I restarted VS. More info here: https://stackoverflow.com/questions/74215881/vs-2022-wont-connect-with-mac-after-ventura-upgrade/74221115 – Alex Kay Oct 27 '22 at 20:37
-
@AlexKay Thanks for pointing me in the correct direction. It worked! :) – Zita Oct 28 '22 at 14:06
-
glad it helped! Please mark my recommendation as the answer so that it can help others. – Alex Kay Oct 29 '22 at 00:08
-
@AlexKay I apologize for the delay! Could you perhaps post your comment as an answer and I'll mark it – Zita Nov 03 '22 at 14:01
-
Sure, I just did that. – Alex Kay Nov 03 '22 at 15:53
1 Answers
2
What works is following these steps:
- add these lines to
/etc/ssh/sshd_config
:
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
- save the file
- restart sshd
- restart Visual Studio
The original recipe was provided here: Visual Studio 2022 won't connect via SSH on macOS after upgrading to Ventura

Alex Kay
- 260
- 1
- 14