Solution - aengusjiang ···
问题:
I follow the document, then check sshd_config,
uncomment“HostKey /etc/ssh/ssh_host_ecdsa_key”
maybe need add the key algorithms:
#HostKeyAlgorithms ssh-ed25519[Redacted]@[Redacted]rsa-sha2-256,rsa-sha2-512
HostKeyAlgorithms ssh-ed25519[Redacted]@[Redacted]rsa-sha2-256,rsa-sha2-512,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
#PubkeyAcceptedKeyTypes ssh-ed25519[Redacted]@[Redacted]rsa-sha2-256,rsa-sha2-512
PubkeyAcceptedKeyTypes ssh-ed25519[Redacted]@[Redacted]rsa-sha2-256,rsa-sha2-512,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
如果还是不行,参考官方文档,确定sshd_config的配置,主要是ecdsa算法
refer to the documentation and try following:
- Open putty and connect to the Linux machine using the root user to verify that you can connect successfully. (My result: putty.png)
- Connect to the machine via putty with a username that requires user authentication, run the command “ssh -Q cipher; ssh -Q mac; ssh -Q kex; ssh -Q key” and check that the output contains “ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521”.
- Please refer to the documentation to set up your Linux machine, connect to the Linux machine in VS using a username that requires user authentication and verify that you can connect successfully