我使用带有Remote-SSH扩展名的Visual-Studio-Code,并且我不想在登录后多次进行身份验证。因此,我使用ssh_config搜索ControlMater选项进行设置。
连接后,出现以下错误消息。
我的环境:
Client:
Visual Studio Code 1.35 Stable
Windows 10 1803
Server:
Ubuntu 16.04 LTS
下面是我的设置文件
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host STONE-OA
HostName 10.32.21.123
User rock
Host Leo-OA
HostName 10.32.21.123
User root
Port 60001
Host *
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
我想知道主要问题是什么以及如何解决。谢谢大家。
答案 0 :(得分:1)
Windows 不支持此功能。 在没有 VS 代码的情况下,在 PowerShell 中使用 ControlMater 在 Windows 上简单地运行 ssh 也有问题。但是,您可以毫无问题地在 WSL 中使用 ControlMater。
<块引用>如果您使用的是 macOS 和 Linux,并且想要减少必须输入密码或令牌的频率,您可以在本地计算机上启用 ControlMaster 功能,以便 OpenSSH 通过单个连接运行多个 SSH 会话。