通过身份验证登录 ssh 工作正常。
C:\Users\${DEVELOPER_NAME}>ssh ${HOST_IP_ADDRESS} -l ${DEVELOPER_NAME} -p ${SSHD_PORT} -i D:\prefix\PuTTY\${OPENSSH_FORMAT_PRIVATE_KEY}
Last login: Sun May 5 15:27:50 2019 from 10.40.171.44
Welcome to ...
[${DEVELOPER_NAME}@${HOST_AKA} ~]$
但是 sshd 运行在 36000 而不是默认的 22 端口上,我怎么能告诉 vs code remote-ssh 插件
Host ${DEVELOPER_NAME}@${HOST_IP_ADDRESS}
HostName ${HOST_IP_ADDRESS}:${SSHD_PORT}
User ${DEVELOPER_NAME}
Port ${SSHD_PORT}
IdentityFile D:\prefix\PuTTY\${OPENSSH_FORMAT_PRIVATE_KEY}
这种方式给了我
Can't connect to ${DEVELOPER_NAME}@${HOST_IP_ADDRESS}: unreachable or not Linux x86_64 (ssh: connect to host ${HOST_IP_ADDRESS} port 22: Connection refused)
和
${DEVELOPER_NAME}@${HOST_IP_ADDRESS}:${SSHD_PORT}
在Remote-SSH: Connect to Host...
给我
Can't connect to ${DEVELOPER_NAME}@${HOST_IP_ADDRESS}:${SSHD_PORT}: unreachable or not Linux x86_64 (ssh: Could not resolve hostname ${HOST_IP_ADDRESS}:${SSHD_PORT}: Name or service not known)