我使用带有远程-SSH扩展的Visual代码,并且我不想在登录后多次进行身份验证。因此,我在ControlMater选项中搜索ssh_config来设置。
在我连接并得到下面的错误消息之后。
无法连接到Leo-OA:无法访问或不能访问Linux x86_64 (packet_write_poll:连接到未知端口-1:权限被拒绝)
我的环境:
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我想知道什么是主要的问题,以及如何解决。谢谢大家。
发布于 2021-02-15 12:54:38
Windows不支持此功能。在没有VS代码的情况下,使用ControlMater在PowerShell上简单地运行ssh也有问题。但是,您可以在WSL中使用ControlMater,没有问题。
enabling-alternate-ssh-authentication-methods
如果您在macOS和Linux上,并且希望减少输入密码或令牌的频率,则可以在本地计算机上启用ControlMaster功能,以便OpenSSH在单个连接上运行多个SSH会话。
https://stackoverflow.com/questions/56520214
复制相似问题