用于Mac的SSH设置,用于创建别名

问题描述 投票:0回答:1

我要别名的SSH地址是

ssh -o StrictHostKeyChecking=no username@[email protected]

我在MAC〜/ .ssh / config中填充为

Host prod
  HostName hostipaddress
  User usrname
  ServerAliveInterval 100
  ProxyJump jumpServerAdress.com
  StrictHostKeyChecking no
  GlobalKnownHostsFile /dev/null
  UserKnownHostsFile /dev/null

[当我执行ssh prod ..它不会让我进入主机

它向我发出信号:

channel 0: open failed: connect failed: open failed
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host

我正在做的配置中有任何错误,请告诉我吗?

macos ssh ssh-tunnel
1个回答
0
投票
我尝试了这个有效的配置

Host jump HostName jumpServerAdress.com User jumpuser Host prod HostName hostipaddress User usrname ServerAliveInterval 100 ProxyJump jump StrictHostKeyChecking no GlobalKnownHostsFile /dev/null UserKnownHostsFile /dev/null

假设您正确设置了ssh密钥。
© www.soinside.com 2019 - 2024. All rights reserved.