VScode: warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
VScodeでSSH接続ができなくなっていた
Windows Updateで何かが変わったらしく,SSH Agentが無効になってしまった.VScodeから会社サーバやgithub等のサービスへ接続できなくなった.
Get-Process : Cannot find a process with the name "ssh-agent".`
SSH Agentを有効にする
Power Shellを管理者権限で起動し,以下のコマンドを実行する. Remote Development Tips and Tricks を参考にした.
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
Get-Service ssh-agent
Power Shell でインストールしたsshが使えない
SSH Agentを有効にしたが,次のようなエラーが発生して失敗してしまった.
warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
Open SSH のアンインストール
C:\Windows\System32\OpenSSH
にインストールされているOpenSSHをアンインストールする.
Get-Service -Name ssh-agent | Stop-Service
sc.exe delete ssh-agent
Remove-WindowsCapability -Online -Name "OpenSSH.Client~~~~0.0.1.0" Remove-WindowsCapability -Online -Name "OpenSSH.Server~~~~0.0.1.0"
Open SSH のインストール
Chocolatey を使ってOpen SSHをインストールする.Chocolateyが使えない場合,PowerShell/openssj-portableから直接ダウンロード&ビルド&インストールできる.
choco install openssh --package-parameters="/SSHAgentFeature"
VScodeのRemote.SSH:Pathを変更
C:\Program Files\OpenSSH-Win64\ssh.exe
これで繋がるようになった.